summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2011-02-23 16:35:47 +0000
committerTor Andersson <tor@ghostscript.com>2011-02-23 16:35:47 +0000
commitd46738227fbc615e7c2a6861ef11920d9ee31f4b (patch)
tree7917b14aa2905620b609ca462a69e31e0ba20582
parent448fcbab4658f24b6067d82162b88c0631567387 (diff)
downloadmupdf-d46738227fbc615e7c2a6861ef11920d9ee31f4b.tar.xz
Check for DynaLab fonts explicitly by name.
-rw-r--r--mupdf/pdf_font.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c
index 9019c8a9..67af2b38 100644
--- a/mupdf/pdf_font.c
+++ b/mupdf/pdf_font.c
@@ -35,6 +35,19 @@ static char *basefontnames[14][7] =
{ "ZapfDingbats", nil }
};
+static int isdynalab(char *name)
+{
+ if (strstr(name, "HuaTian"))
+ return 1;
+ if (strstr(name, "MingLi"))
+ return 1;
+ if ((strstr(name, "DF") == name) || strstr(name, "+DF"))
+ return 1;
+ if ((strstr(name, "DLC") == name) || strstr(name, "+DLC"))
+ return 1;
+ return 0;
+}
+
static int strcmpignorespace(char *a, char *b)
{
while (1)
@@ -605,10 +618,11 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco
/* Check for DynaLab fonts that must use hinting */
if (kind == TRUETYPE)
{
- if (FT_IS_TRICKY(face))
- fontdesc->font->fthint = 1;
- if (strstr(collection, "Adobe-"))
+ if (FT_IS_TRICKY(face) || isdynalab(fontdesc->font->name))
+ {
fontdesc->font->fthint = 1;
+ pdf_logfont("forced hinting for dynalab font\n");
+ }
}
/* Encoding */