From 4ed1b8523f813f4b94b33fd1c6109cdd24179056 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 5 Apr 2018 14:21:43 +0200 Subject: 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. --- source/pdf/pdf-font.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/pdf') 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; -- cgit v1.2.3