On 15/03/2010 14:37, Kim Hansen wrote:
Hi Werner
2010/3/15 Werner F. Bruhin <werner.bru...@free.fr
<mailto:werner.bru...@free.fr>>
Hi Kim,
Changing the line 560 in mathtext.py from:
font = FT2Font(basename)
to:
font = FT2Font(str(basename))
Fixed it for me, I don't know what FT2Font does and why this
matters - hopefully someone else can expand on this.
This worked here as well - sort of, at least.
It was just a guess, as I noticed that the other call to FT2Font is
using str too.
It does not crash anymore, but the LaTeX $\alpha-\beta$ in the title
is not rendered correctly in the title of the graph for the users who
had problems before.
Yeap, I see this now too.
I guess it must be due to some fonts not being available in the dist,
which are available to me and others. I do not know if there is a way
to patch up setup.py such that the needed fonts are included in the dist?
It should be there, i.e. mpl-data in the lib/site-packages/matplotlib
folder has the same number of files and folders as the one created by
setup.py in dist.
But it obviously doesn't find it or some other setting to handle the
LaTex stuff is not there.
Put this at the top of alphabeta.py, i.e. just after import matplotlib
matplotlib.verbose.level = u'debug'
and change setup.py to generate a console app. If I run this on my dev
machine the output shows that fonts are found, but if I run it on the
py2exe'd version lots of STIX fonts are not found. Even so these fonts
are in mpl-data/fonts/ttf of the py2exe dist folder.
So, I think/guess that the font searching is not done correctly, as
running with verbose "debug" it shows that it finds the mpl-data folder
in the dist folder or wherever you copy dist too.
Hopefully someone who knows how the font searching is done can help
out/point to the culprit.
Attached your setup.py a bit simplified as you are using
matplotlib 0.99.
Thank you. I am using your setup.py now. It was very kind of you to
send that.
You are welcome
Werner
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users