summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/font.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-05-30 19:07:32 +0100
committerRobin Watts <robin.watts@artifex.com>2016-05-30 20:07:48 +0100
commit61cb26c84a9c542c537c172b14b9c4ebed5b763a (patch)
tree4e6bec323e61b6b9c2e20d7ee51ce849aff913fa /include/mupdf/fitz/font.h
parent2ba534c2491368ce2c76fc715ad4bd5af4eee22d (diff)
downloadmupdf-61cb26c84a9c542c537c172b14b9c4ebed5b763a.tar.xz
Avoid fz_font pulling harfbuzz in.
We store an hb_font in every font, and currently have fz_drop_font know to call harfbuzz to destroy it. This causes harfbuzz to be included even in builds that never use it. We improve this situation by storing both an hb_font, and a function pointer to destroy it within fz_font. This costs us an extra pointer per fz_font, but solves the problem.
Diffstat (limited to 'include/mupdf/fitz/font.h')
-rw-r--r--include/mupdf/fitz/font.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h
index 2d3a8100..f45f32fc 100644
--- a/include/mupdf/fitz/font.h
+++ b/include/mupdf/fitz/font.h
@@ -37,6 +37,7 @@ struct fz_font_s
void *ft_face; /* has an FT_Face if used */
void *hb_font; /* hb_font for shaping */
+ void (*hb_destroy)(void *); /* Destructor for hb_font */
int ft_substitute; /* ... substitute metrics */
int ft_stretch; /* ... and stretch to match PDF metrics */