[gs-bugs] [Bug 691457] PDF without fonts will not display
bugzilla-daemon at ghostscript.com
bugzilla-daemon at ghostscript.com
Tue Jul 20 09:40:14 UTC 2010
http://bugs.ghostscript.com/show_bug.cgi?id=691457
akay <akay at 21cn.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
--- Comment #2 from akay <akay at 21cn.com> 2010-07-20 09:40:13 UTC ---
Hi,I make a patch to view the buggy pdf.(Reference from
http://code.google.com/p/sumatrapdf/issues/detail?id=844)
--- c:/pdf_fontfile.c 星期三 七月 14 19:02:22 2010
+++ d:/MyProgram/MuPdf/mupdf/pdf_fontfile.c 星期二 七月 20 17:35:17 2010
@@ -216,6 +216,9 @@
fz_warn("unknown cid collection: %s", collection);
}
+ if (strlen(fontname) == 0)
+ return loadsystemcidfont(fontdesc, GB, MINCHO);
+
if (isscript)
name = "Chancery";
--- c:/pdf_font.c 星期三 七月 14 19:02:22 2010
+++ d:/MyProgram/MuPdf/mupdf/pdf_font.c 星期二 七月 20 17:29:56 2010
@@ -456,6 +456,12 @@
}
}
+ error = pdf_loadsystemcmap(&fontdesc->encoding, "GBK-EUC-H");
+ error |= pdf_loadsystemcmap(&fontdesc->tounicode, "Adobe-GB1-UCS2");
+ error |= pdf_loadsystemcmap(&fontdesc->tottfcmap, "Adobe-GB1-UCS2");
+ if (!error)
+ goto skipencoding;
+
/* try to reverse the glyph names from the builtin encoding */
for (i = 0; i < 256; i++)
{
@@ -483,7 +489,7 @@
error = pdf_loadtounicode(fontdesc, xref, estrings, nil, fz_dictgets(dict,
"ToUnicode"));
if (error)
goto cleanup;
-
+skipencoding:
/*
* Widths
*/
--
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the gs-bugs
mailing list