summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-08-06 00:34:22 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-08-06 00:34:22 +0200
commitd53ebe66b7b13b13e4afced80a4c113d9d578c8f (patch)
tree5b93471cc53edb9af95d2d4d5bd5fe183f3358ab /pdf
parent4ffa961d35b8985fd041f27737d06d9c59e41d6b (diff)
downloadmupdf-d53ebe66b7b13b13e4afced80a4c113d9d578c8f.tar.xz
Move Dynalab tricky font check to cover simple fonts as well.
Fix bug 692325.
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdf_font.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/pdf/pdf_font.c b/pdf/pdf_font.c
index 36c23d0e..e7da43c0 100644
--- a/pdf/pdf_font.c
+++ b/pdf/pdf_font.c
@@ -758,13 +758,6 @@ load_cid_font(pdf_font_desc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *e
face = fontdesc->font->ft_face;
kind = ft_kind(face);
- /* Check for DynaLab fonts that must use hinting */
- if (kind == TRUETYPE)
- {
- if (FT_IS_TRICKY(face) || is_dynalab(fontdesc->font->name))
- fontdesc->font->ft_hint = 1;
- }
-
/* Encoding */
error = fz_okay;
@@ -988,6 +981,7 @@ pdf_load_font_descriptor(pdf_font_desc *fontdesc, pdf_xref *xref, fz_obj *dict,
fz_obj *obj1, *obj2, *obj3, *obj;
char *fontname;
char *origname;
+ FT_Face face;
if (!strchr(basefont, ',') || strchr(basefont, '+'))
origname = fz_to_name(fz_dict_gets(dict, "FontName"));
@@ -1034,6 +1028,14 @@ pdf_load_font_descriptor(pdf_font_desc *fontdesc, pdf_xref *xref, fz_obj *dict,
fz_strlcpy(fontdesc->font->name, fontname, sizeof fontdesc->font->name);
+ /* Check for DynaLab fonts that must use hinting */
+ face = fontdesc->font->ft_face;
+ if (ft_kind(face) == TRUETYPE)
+ {
+ if (FT_IS_TRICKY(face) || is_dynalab(fontdesc->font->name))
+ fontdesc->font->ft_hint = 1;
+ }
+
return fz_okay;
}