Bug 690348

Summary: Error "/invalidfont" when generating PDF
Product: Ghostscript Reporter: artifex
Component: PDF WriterAssignee: Ken Sharp <ken.sharp>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P4    
Version: 8.56   
Hardware: PC   
OS: Windows XP   
Customer: 870 Word Size: ---
Attachments: ihwk.pdf

Description artifex 2009-03-20 02:12:07 UTC
The attached PDF-file ihwk.pdf can be viewed or converted to tiffg4, Postscript
etc. very well. But when generating PDF ( gs -sDEVICE=pdfwrite -o out.pdf
ihwk.pdf ) the convertion will fail with the error message "Error: /invalidfont
in --run--".
Comment 1 artifex 2009-03-20 02:12:54 UTC
Created attachment 4853 [details]
ihwk.pdf
Comment 2 Ken Sharp 2009-03-20 09:46:14 UTC
The TrueType font is invalid for the purposes of embedding as far as GS is
concerned. The problem is that the embedded TT font has an empty 'name' table,
which we use in order to name the font.

I can fudge around this and it does work, though the font is oddly named
afterwards. I'll try and see if I can come up with a better solution. However,
the font really is not very good.

This doesn't matter for rendering of course, because we don't care what the
TrueType font is called, just the CIDFont 'wrapper' font
.
Comment 3 Ken Sharp 2009-03-23 02:42:06 UTC
This is fixed in revision 9579, patch here:

http://ghostscript.com/pipermail/gs-cvs/2009-March/009153.html

Note that, because the embedded TrueType font has an empty name table, the
resulting PDF file will contain a font with an odd, numeric, name.