Summary: | Regression: Error writing PDF file: Missing glyph CID=0 in Bug689614.pdf | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | PDF Writer | Assignee: | Ken Sharp <ken.sharp> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | master | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | Word Size: | --- | |
Attachments: | singular_ctm_empty_fontbbox.pdf |
Description
Marcos H. Woehrmann
2008-04-10 07:35:50 UTC
Created attachment 3929 [details] Bug689614.pdf This file is a customer file that was originally associated with bug 689614. Therefore it needs to be marked private. Converting this file to a raster format (such as tiff24nc) works. Yes, the error message is specific to pdfwrite (gdevpdtc.c, line 527): eprintf2("Missing glyph CID=%d in the font %s . The output PDF may fail with some viewers.\n", (int)cid, buf); Notice it uses eprintf, hence the reason the release information gets printed. I think the last person to mess about here was me last summer on bug 689212, so I guess I broke something. Not sure why, I'll have to debug it to find out. This isn't a regression; gs8.54 fails the same way. Created attachment 3979 [details]
singular_ctm_empty_fontbbox.pdf
The regression file, singular_ctm_empty_fontbbox.pdf (attached), fails the same
way.
I think this has always been incorrect. While processing text we discover that we need a glyph from a CIDFont, and the glyph is not present (the error message is misleading). We substitute for CID = 0 (is the .notdef) and carry on. It 'looks like' this was intended to skip the next sequence of code by setting the 'code' variable to 1, however, if this is the *first* glyph in the font, then the .notdef seems to have a zero width. So we go off and process its width. When we come back we then execute the CDevProc, sadly we try to do this with the missing glyph CID, so unsurprisingly it fails. I have a 'fix' (more of a work-around) which I'm testing now. Fixed with this patch: http://ghostscript.com/pipermail/gs-cvs/2009-January/008907.html |