summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2016-09-28 19:58:53 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-05 19:37:11 +0100
commitc2901d60fa98874d4a36cf1ab57a03cb80fde038 (patch)
tree948bd3c69624d1bbc1f2893cc30c54720bce7a50 /source/fitz
parent9e88b088ea2ddcb6f85584750eb3c989af101905 (diff)
downloadmupdf-c2901d60fa98874d4a36cf1ab57a03cb80fde038.tar.xz
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.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/font-impl.h2
-rw-r--r--source/fitz/font.c10
2 files changed, 5 insertions, 7 deletions
diff --git a/source/fitz/font-impl.h b/source/fitz/font-impl.h
index b6015172..231940ed 100644
--- a/source/fitz/font-impl.h
+++ b/source/fitz/font-impl.h
@@ -16,7 +16,7 @@ struct fz_font_s
fz_font_flags_t flags;
void *ft_face; /* has an FT_Face if used */
- fz_hb_t hb;
+ fz_shaper_data_t shaper_data;
fz_matrix t3matrix;
void *t3resources;
diff --git a/source/fitz/font.c b/source/fitz/font.c
index be0f38d7..b406c259 100644
--- a/source/fitz/font.c
+++ b/source/fitz/font.c
@@ -158,11 +158,9 @@ fz_drop_font(fz_context *ctx, fz_font *font)
fz_free(ctx, font->bbox_table);
fz_free(ctx, font->width_table);
fz_free(ctx, font->advance_cache);
- if (font->hb.destroy && font->hb.font)
+ if (font->shaper_data.destroy && font->shaper_data.shaper_handle)
{
- hb_lock(ctx);
- font->hb.destroy(font->hb.font);
- hb_unlock(ctx);
+ font->shaper_data.destroy(ctx, font->shaper_data.shaper_handle);
}
fz_free(ctx, font);
}
@@ -1580,7 +1578,7 @@ fz_font_flags_t *fz_font_flags(fz_font *font)
return font ? &font->flags : NULL;
}
-fz_hb_t *fz_font_hb(fz_font *font)
+fz_shaper_data_t *fz_font_shaper_data(fz_font *font)
{
- return font ? &font->hb : NULL;
+ return font ? &font->shaper_data : NULL;
}