Andrew Jaffe wrote:
> Michael Droettboom wrote:
>> Andrew,
>>
>> I believe this bug was recently discussed on matplotlib-devel and is 
>> likely related to recent changes in the font manager cache.
>>
>> http://www.mail-archive.com/[EMAIL PROTECTED]/msg01531.html
>>
>> I believe it's being looked into, but I haven't seen a resolution 
>> (unless I missed it).
> 
> Ah, sorry, this is indeed the same problem.
> 
> Adding
> 
> pdf.use14corefonts :  True
> 
> to matplotlibrc does fix it, FWIW.

It solves the immediate problem for people who run into it, and it 
provides a clue about what the underlying problem is, but it does not 
fully identify or solve that problem.

To make real progress on it, we need an OSX user who understands 
something about font matters--or maybe only enough about OSX to do some 
exploration.

In font_manager.py, in the FontManager class, is the following:

         if rcParams['pdf.use14corefonts']:
             # Load only the 14 PDF core fonts. These fonts do not need 
to be
             # embedded; every PDF viewing application is required to 
have them:
             # Helvetica, Helvetica-Bold, Helvetica-Oblique, 
Helvetica-BoldOblique,
             # Courier, Courier-Bold, Courier-Oblique, Courier-BoldOblique,
             # Times-Roman, Times-Bold, Times-Italic, Times-BoldItalic, 
Symbol,
             # ZapfDingbats.
             afmpath = 
os.path.join(rcParams['datapath'],'fonts','pdfcorefonts')
             afmfiles = findSystemFonts(afmpath, fontext='afm')
             self.afmdict = createFontDict(afmfiles, fontext='afm')
         else:
             self.afmfiles = findSystemFonts(paths, fontext='afm') + \
                             findSystemFonts(fontext='afm')
             self.afmdict = createFontDict(self.afmfiles, fontext='afm')


I think that the problem is occurring in the last line.  This remains to 
be verified.  It looks like *.afm files are being found, but when 
createFontDict tries to parse them it doesn't find what it expects.

My guess is that this problem has been lurking all along, but was only 
triggered when I changed font_manager to look for *all* system fonts 
instead of only truetype, so that it could generate a complete cache and 
then never have to search again unless the cache (actually a pickle of 
the FontManager instance) is deleted.

Eric

> 
> Andrew
> 
> 
> 
> 
>> Cheers,
>> Mike
>>
>> Andrew Jaffe wrote:
>>> Hi All,
>>>
>>> I've got Intel OSX 10.4.10 with SVN versions of numpy, scipy and 
>>> matplotlib.
>>>
>>> The latest matplotlib seems to fail on "import pylab" or "ipython 
>>> -pylab" with very many lines of the form
>>>
>>> "Found an unknown keyword in AFM header (was"
>>> followed either by a legit character or lots of junk.
>>>
>>> For what it's worth, I tend to install eggs rather than simple setup.py 
>>> install; moving back to r3421 which I had prevviously seems to work fine.
>>>
>>> Any ideas?
>>>
>>> Yours,
>>>
>>> Andrew

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to