Hi Mike,

It's matplotlib 0.90.1.0003, and it does not seem to matter which
backend I am using.  All backends available on my machine give me a
sans-serif font, with the exception of WX, which gives me a serif
font.  I've attached the debug output to this email.  It looks like
findfont is failing to find the requested serif fonts so it is
returning the default font.  I'm not sure why this would be the case
as I know I have Times New Roman (times.ttf) in my c:\windows\fonts
folder.

I looked through the matplotlib docs and it says that findfont should
be able to find the fonts if they are in system default locations, so
I'm a bit stumped as to what to do now.

Thanks!
Orest

On Dec 14, 2007 8:16 AM, Michael Droettboom <[EMAIL PROTECTED]> wrote:
> I'm not able to reproduce this bug here (on a Linux machine).
>
> Which backend are you using?  What version of matplotlib?  Can you set
> the parameter "verbose.level" to "debug-annoying" and send the output to
> this list?
>
> Cheers,
> Mike
>
>
> Orest Kozyar wrote:
> > I've been trying to set the font properties of the plots that I've
> > been making with matplotlib; however, there appears to be a problem
> > with font rendering.  For example, when I check the properties of text
> > on the axes, etc, the font class is set to serif; however, the font in
> > the plot does not appear to be serif.  I ran several of the font demos
> > in the matplotlib examples directory, and the fonts all looked the
> > same (except for size).  Attached is the PNG of the fonts_demo.py
> > output.
> >
> > The only way I was able to get serif fonts was if I call:
> >
> > rc('text', usetex=True), and even then this only changes the fonts on
> > the axis tick labels.  xlabel, ylabel still remain sans-serif.
> >
> > I'm sure I am missing something obvious, but have read through all the
> > documentation available on the matplotlib website regarding fonts, and
> > they don't seem to indicate that I need to install anything else.
> >
> > This is Python 2.5 on Windows XP.
> >
> > Thanks,
> > Orest
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > ------------------------------------------------------------------------
> >
> > -------------------------------------------------------------------------
> > SF.Net email is sponsored by:
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services
> > for just about anything Open Source.
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=652.0,                         height=492.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal 400, normal, 14.4
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, 
Lucid, Arial, Helvetica, Avant Garde, sans-serif
Could not match Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, 
Arial, Helvetica, Avant Garde, sans-serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Script MT
        findfont failed Apple Chancery, Textile, Zapf Chancery, Sand, cursive
Could not match Apple Chancery, Textile, Zapf Chancery, Sand, cursive, normal, 
normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Comic Sans MS, Chicago, Charcoal, Impact, Western, 
fantasy
Could not match Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy, 
normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, 
Courier New, Courier, Fixed, Terminal, monospace
Could not match Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier 
New, Courier, Fixed, Terminal, monospace, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, 
Lucid, Arial, Helvetica, Avant Garde, sans-serif, italic
Could not match Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, 
Arial, Helvetica, Avant Garde, sans-serif, italic, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, 
Lucid, Arial, Helvetica, Avant Garde, sans-serif, oblique
Could not match Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, 
Arial, Helvetica, Avant Garde, sans-serif, oblique, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont found Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal 200, normal, 12.0
findfont returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont cached Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal, 500, normal, 12.0
findfont returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont cached Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal, 600, normal, 12.0
findfont returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont cached Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal, 700, normal, 12.0
findfont returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont cached Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal, 800, normal, 12.0
findfont returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont cached Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal, 900, normal, 12.0
findfont returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal 400, normal, 6.948
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal 400, normal, 8.328
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal 400, normal, 9.996
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont cached Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal, 400, normal, 12.0
findfont returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal 400, normal, 17.28
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal 400, normal, 20.736
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, normal, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, italic
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, italic, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, italic, normal 700, normal, 12.0
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, italic, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
        findfont failed Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, italic, normal 700, normal, 17.28
Could not match Bitstream Vera Serif, New Century Schoolbook, Century 
Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New 
Roman, Times, Palatino, Charter, serif, italic, normal.  Returning 
c:\programs\Python25\lib\site-packages\matplotlib-0.90.1.0003-py2.5-win32.egg\matplotlib\mpl-data\fonts\ttf\Vera.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to