diff options
author | Tor Andersson <tor@ghostscript.com> | 2009-12-08 00:13:49 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2009-12-08 00:13:49 +0100 |
commit | fc32a20845d30c6734767f08d35749d5cf34fa97 (patch) | |
tree | 83dac402930087fbdf90dd05a6bf9f81c2e3b446 | |
parent | a1af44ac5a8a0f94f8b8ba9fe7597422a87792e0 (diff) | |
download | mupdf-fc32a20845d30c6734767f08d35749d5cf34fa97.tar.xz |
Use correct default value for DW entry in CID fonts.
-rw-r--r-- | mupdf/pdf_font.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mupdf/pdf_font.c b/mupdf/pdf_font.c index ffc28c27..408d770d 100644 --- a/mupdf/pdf_font.c +++ b/mupdf/pdf_font.c @@ -216,7 +216,7 @@ pdf_newfontdesc(void) fontdesc->dhmtx.lo = 0x0000; fontdesc->dhmtx.hi = 0xFFFF; - fontdesc->dhmtx.w = 0; + fontdesc->dhmtx.w = 1000; fontdesc->dvmtx.lo = 0x0000; fontdesc->dvmtx.hi = 0xFFFF; @@ -543,6 +543,8 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco char collection[256]; char *basefont; int i, k, fterr; + fz_obj *obj; + int dw; /* * Get font name and CID collection @@ -552,7 +554,6 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco { fz_obj *cidinfo; - fz_obj *obj; char tmpstr[64]; int tmplen; @@ -703,8 +704,11 @@ loadcidfont(pdf_fontdesc **fontdescp, pdf_xref *xref, fz_obj *dict, fz_obj *enco /* * Horizontal */ - - pdf_setdefaulthmtx(fontdesc, fz_toint(fz_dictgets(dict, "DW"))); + dw = 1000; + obj = fz_dictgets(dict, "DW"); + if (obj) + dw = fz_toint(obj); + pdf_setdefaulthmtx(fontdesc, dw); widths = fz_dictgets(dict, "W"); if (widths) |