Nicolas Grilly <nicolas.gri...@garden-paris.com> writes: > The PDF backend breaks when the setting pdf.use14corefonts=True is > used. You'll find a test case reproducing this bug in the attached > file 'test_pdf_use14corefonts.py'.
You're right. I committed your patch, but there is another bug that makes this a little difficult to test: the font cache doesn't record whether it was build with pdf.use14corefonts enabled or not, and the font name "Helvetica" happens to match "Helvetica Narrow", whose metrics are included with matplotlib, and using that afm file without including the font itself breaks the output. I'm too busy with other things to fix this now, but patches are welcome. As a workaround, deleting ~/.matplotlib/fontList.cache helps if anyone wants to alternate between enabling and disabling use14corefonts. > This setting is very useful because it produces very lightweight PDF > files. The files are lightweight because they only use the 14 core > fonts built in every PDF viewers (like Helvetica and Times). Unfortunately, this functionality is deprecated in the PDF standard as of PDF 1.5, and many publishers require embedding all fonts in PDF files. Apparently not all substitutes for the standard fonts are similar enough. (The real fonts need to be licensed, so many Linux distributions ship with free look-alike substitutes, and who knows what fonts are installed on some publisher's systems.) Thanks for the patch! -- Jouni K. Seppänen http://www.iki.fi/jks ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel