summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-font.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-04-05 14:21:43 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-04-11 13:44:50 +0200
commit4ed1b8523f813f4b94b33fd1c6109cdd24179056 (patch)
tree532daf434f29f820b7a048a428ad02a3c5a76f07 /source/pdf/pdf-font.c
parenta6a17f72fb0c237558f7343f475910c2c7f94798 (diff)
downloadmupdf-4ed1b8523f813f4b94b33fd1c6109cdd24179056.tar.xz
Rework how we handle DynaLab tricky fonts in freetype.
Force the face_flags to include TRICKY if we detect a DynaLab font name instead of trying to force hinting ourselves.
Diffstat (limited to 'source/pdf/pdf-font.c')
-rw-r--r--source/pdf/pdf-font.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c
index ae03c58b..148f4c29 100644
--- a/source/pdf/pdf-font.c
+++ b/source/pdf/pdf-font.c
@@ -1329,8 +1329,9 @@ pdf_load_font_descriptor(fz_context *ctx, pdf_document *doc, pdf_font_desc *font
face = fontdesc->font->ft_face;
if (ft_kind(face) == TRUETYPE)
{
- if (FT_IS_TRICKY(face) || is_dynalab(fontdesc->font->name))
- fontdesc->font->flags.force_hinting = 1;
+ /* FreeType's own 'tricky' font detection needs a bit of help */
+ if (is_dynalab(fontdesc->font->name))
+ face->face_flags |= FT_FACE_FLAG_TRICKY;
if (fontdesc->ascent == 0.0f)
fontdesc->ascent = 1000.0f * face->ascender / face->units_per_EM;