From c2901d60fa98874d4a36cf1ab57a03cb80fde038 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 28 Sep 2016 19:58:53 +0100 Subject: Uncouple font shaper data from harfbuzz. The fz_font structure now doesn't know anything about harfbuzz at all, it merely offers an abstract 'fz_shaper_data_t' entry. --- include/mupdf/fitz/font.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h index 69959908..0c31dbff 100644 --- a/include/mupdf/fitz/font.h +++ b/include/mupdf/fitz/font.h @@ -47,11 +47,20 @@ fz_font_flags_t *fz_font_flags(fz_font *font); typedef struct { - void *font; /* hb_font for shaping */ - void (*destroy)(void *); /* Destructor for hb_font */ -} fz_hb_t; + void *shaper_handle; + void (*destroy)(fz_context *ctx, void *); /* Destructor for shape_handle */ +} fz_shaper_data_t; -fz_hb_t *fz_font_hb(fz_font *font); +/* + fz_shaper_data_t: Retrieve a pointer to the shaper data + structure for the given font. + + font: The font to query. + + Returns a pointer to the shaper data structure (or NULL if + font is NULL). +*/ +fz_shaper_data_t *fz_font_shaper_data(fz_font *font); const char *fz_font_name(fz_font *font); void *fz_font_ft_face(fz_font *font); -- cgit v1.2.3