Did you ever find the cause of this?
I found that the get_py2exe_datafiles() method didn't find those fonts but
even when I got the fonts manually I still had the same issue with
matplotlib's Font Manager not being able to find them.
On Thu, Nov 10, 2011 at 11:22 AM, Armando Serrano Lombillo <
arser...@gmail.com> wrote:
> I'm doing data_files += matplotlib.get_py2exe_datafiles().
>
> By the way, the plot I'm trying to do is in log scale, so it is using
> superscripts (when I was searching the lists for an answer I saw some posts
> mentioning this had caused problems).
>
> Oh, and I'm using options={'py2exe':{'bundle_files':1, 'optimize':1}}.
>
> Python 2.5.4 and matplotlib 1.0.0.
>
>
> On Thu, Nov 10, 2011 at 5:03 PM, Michael Droettboom <md...@stsci.edu>wrote:
>
>>
>> Did you include the fonts as described here?
>>
>> http://www.py2exe.org/index.cgi/MatPlotLib
>>
>> Mike
>>
>>
>> On 11/10/2011 08:03 AM, Armando Serrano Lombillo wrote:
>>
>> Hello, I'm having a weird problem with matplotlib not finding fonts when
>> being used from a py2exe packed program. The weird thing is that the
>> program works fine on some computers, gives an annoying warning in others
>> (but otherwise keeps working and plots things ok) or gives an error (and no
>> plot is produced) in others.
>>
>> A strange thing I noticed is that I'm using python 2.5 and one of the
>> warnings is referring to python 2.6, so somehow it must be confusing itself
>> with a python version installed in that computer.
>>
>> Can somebody help?
>>
>> Thanks,
>> Armando.
>>
>> Warning it gives on some computers:
>>
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXGeneral'] not found. Falling back
>> to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252:
>> UserWarning: findfont: Could not match :family=Bitstream Vera
>> Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
>> Returning C:\Windows\Fonts\cour.ttf
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXNonUnicode'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252:
>> UserWarning: findfont: Could not match :family=Bitstream Vera
>> Sans:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0.
>> Returning C:\Windows\Fonts\cour.ttf
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeFourSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeFiveSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['STIXSizeTwoSym'] not found. Falling
>> back to Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1252:
>> UserWarning: findfont: Could not match :family=Bitstream Vera
>> Sans:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0.
>> Returning C:\Windows\Fonts\cour.ttf
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmb10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmmi10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmex10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmsy10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmr10'] not found. Falling back to
>> Bitstream Vera Sans
>> C:\Program Files\myprogram\gui.exe\matplotlib\font_manager.py:1242:
>> UserWarning: findfont: Font family ['cmss10'] not found. Falling back to
>> Bitstream Vera Sans
>>
>> Error it gives in another computer:
>>
>> Traceback (most recent call last):
>> File "gui.pyw", line 489, in parejas_fN
>> File "postproceso.pyo", line 714, in __init__
>> File "matplotlib\backends\backend_wxagg.pyo", line 59, in draw
>> File "matplotlib\backends\backend_agg.pyo", line 394, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\figure.pyo", line 798, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\axes.pyo", line 1934, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\axis.pyo", line 1017, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\axis.pyo", line 234, in draw
>> File "matplotlib\artist.pyo", line 55, in draw_wrapper
>> File "matplotlib\text.pyo", line 524, in draw
>> File "matplotlib\text.pyo", line 298, in _get_layout
>> File "matplotlib\backends\backend_agg.pyo", line 180, in
>> get_text_width_height_descent
>> File "matplotlib\backends\backend_agg.pyo", line 221, in _get_agg_font
>> RuntimeError: Could not open facefile
>> C:\Python26\lib\site-packages\matplotlib\mpl-data\fonts\ttf\Vera.ttf;
>> Cannot_Open_Resource
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register nowhttp://p.sf.net/sfu/rsa-sfdev2dev1
>>
>>
>>
>> _______________________________________________
>> Matplotlib-users mailing
>> listMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users