Hi Thanks for the replies. I replaced all the fonts of my script to Helvetica and it works fine. Yes, I'm using ps.fonttype=3. The files are pretty small. But I still couldn't find out why matplotlib was getting that ttf Vera...
Cheers, Marco On Tue, Aug 26, 2008 at 4:48 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > The "useafm" option is designed to work with the 14 standard Postscript > fonts. I suppose it's possible to use a third-party afm, but such a thing > would be extremely rare. The closest thing to Arial in the standard PS > fonts is Helvetica. > > But yes, this is a bug, only in that the error message could be better, not > that using Arial as an AFM would ever work. > > As for reducing file sizes, are you already using ps.fonttype set to 3? > That will subset a TTF font, and should reduce file sizes over type 42. > > Cheers, > Mike > > Marco A. S. Netto wrote: >> >> 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 >> > > ------------------------------------------------------------------------- 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