Bug 84270

Summary: poppler doesn't render any glyphs from a wrong embedded font
Product: poppler Reporter: Thomas Freitag <Thomas.Freitag>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: PDF with missing glyphs
Accepts offsets to the end of the table

Description Thomas Freitag 2014-09-24 08:37:46 UTC
Created attachment 106769 [details]
PDF with missing glyphs

Any glyph of the embedded font SFBMTB+Frutiger-Bold is not rendered in the attached PDF, where as the glyphs of the also embedded font PFBMTB+Frutiger-Light are rendered.
Comment 1 Thomas Freitag 2014-09-24 08:55:10 UTC
The truetype font SFBMTB+Frutiger-Bold has a POST entry in format 2. (This contains the data needed for the FontInfo dictionary entry as well as the PostScript names for all of the glyphs in the font) The spec for this entry says:

If you do not want to associate a PostScript name with a particular glyph, use index number 0 which points to the name .notdef. 

But the software which embeds this font makes it in another way: All not associated glyphs points to the end(!!) of the Postscript name table (entry for this glyphs: 270). That's why poppler invalidates this font and therefore don't render any glyphs of it, and it does so without giving any error message.

But since ghostscript and acrobat reader show the glyph of this font I think poppler should do it either.
Comment 2 Thomas Freitag 2014-09-24 08:59:55 UTC
Created attachment 106771 [details] [review]
Accepts offsets to the end of the table

This patch accepts the entries which points to the end of the table and handles them as if they points to .notdef.

(I've regtested the patch without any problems)
Comment 3 Albert Astals Cid 2014-09-25 22:26:19 UTC
Awesome, commtied.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.