Bug 18973

Summary: Don't embed the base Postscript fonts
Product: cairo Reporter: Howard Chu <hyc>
Component: pdf backendAssignee: Adrian Johnson <ajohnson>
Status: RESOLVED WONTFIX QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: enhancement    
Priority: medium    
Version: 1.8.2   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Howard Chu 2008-12-09 00:29:37 UTC
I'm using a PDF reader on Google/Android that doesn't render embedded fonts. It renders documents fine if they use the basic PostScript fonts (Times, Courier, Helvetica, etc.) But Cairo always subsets/embeds all fonts, even the basic PS fonts. So the docs I generate with Cairo are unreadable with this reader.

It would be nice to have an option to turn embedding off for a specific list of fonts. This option should be settable independently of the calling application. (I'm using Mozilla to print an HTML document as a PDF file, and want this feature to be usable without any code changes in Mozilla. Perhaps setting via an environment variable.)
Comment 1 Adrian Johnson 2008-12-14 05:50:45 UTC
Cairo uses glyph indices in both the API and in the PDF file to refer to each glyph. It is not possible to rely on an external font to the PDF as the font glyph indices used to create the PDF may not be the same as the glyph indices in the font used to render the PDF.

A PDF reader that does not support embedded fonts is a broken PDF reader. Almost all the PDFs I have seen embed the fonts. I suggest filing a bug report with Android about the lack of embedded font support.

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.