Hi everyone

I'm a matplotlib's beginner user and I had a problem that seems to be
a bug. If I enable the option ps.useafm and I ask for a font that is
not available in my OS, the matplotlib's font manager tries to get a
default font, which is Vera (I don't know how the default font is set
to Vera, since I removed it from the font.serif and font.sans-serif
lists). The problem is that the font manager is getting a ttf file, in
my OS it is located at
/usr/share/fonts/truetype/tf-bitstream-vera/Vera.ttf. Therefore I'm
getting the error:

Could not match Arial, normal, 400.  Returning
/usr/share/fonts/truetype/tf-bitstream-vera/Vera.ttf  (this line is
showed when I use the option --verbose-helpful)
...
...
...
 File "/usr/lib/python2.5/site-packages/matplotlib/afm.py", line 295,
in __init__
    parse_afm(fh)
  File "/usr/lib/python2.5/site-packages/matplotlib/afm.py", line 281,
in parse_afm
    _sanity_check(fh)
  File "/usr/lib/python2.5/site-packages/matplotlib/afm.py", line 76,
in _sanity_check
    raise RuntimeError('Not an AFM file')
RuntimeError: Not an AFM file

Is this a bug? Shouldn't matplotlib try to get an AFM default font,
rather than a ttf font, in case it cannot find what I'm looking for
(with ps.useafm=True)?  In my case I put the font Arial but matplotlib
was not able to find it.   Some details: I'm using ubuntu hardy and
matplotlib version 0.98.3. backend PS to generated eps files. My
decision to use AFM is to reduce the file sizes.

Kind regards,
Marco

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to