We can first try to track down whether the Arial MS Unicode font is 
getting picked up.  In your matplotlibrc, can you add:

   verbose: debug-annoying

and send the output of your plot to the list?  You'll see where it looks 
up the font and whether that lookup failed or not.

There have been a number of Unicode-related fixes in SVN since the 
0.90.1 release -- though most were in the PDF backend, not PS.  One 
thing to try (don't know offhand whether it's working better or not) may 
be to use the Cairo backend to generate the PS and then use ps2epsi to 
get an EPS.

Cheers,
Mike

David Loyall wrote:
> Hello.
> 
> I've been having trouble getting Unicode characters to render.  I just
> get a box in the title of my figure, rather than the character I need.
> 
> Here is my code:
> #!/usr/bin/env python
> from pylab import *
> plot([1,2,3,4])
> title(u"\u0251")
> savefig("test.eps")
> savefig("test.png")
> show()
> 
> That character is LATIN SMALL LETTER ALPHA.  It's used in the
> International Phonetic Alphabet.
> 
> I'm on Linux and I'm using matplotlib 0.90.1-2 (debian package
> version).  I have a few TTF fonts in my system that contain that
> glyph.  One is 'Arial Unicode MS', which I copied from my windows
> machine.
> 
> As you can see, I will need to generate an EPS that renders the
> character...  That EPS file will be imported into MS Word on a Windows
> PC and printed.
> 
> I will happily use any solution that allows me to use that character
> in the final product... :)  It doesn't have to be unicode..
> 
> I believe that my fonts are configured correctly on this Linux
> system--I can use the Arial Unicode MS font in Open Office.  However,
> I'm not sure that MPL is finding them.
> 
> When I point the TTFPATH environment variable a directory that only
> contains ARIALUNI.TTF, I get gibberish for all characters in my
> figure.
> 
> When I use ~/.matplotlib/matplotlibrc to list Arial Unicode MS as the
> only font in the san-serif family, I don't observe any change in the
> text in the figure.
> 
> ...I did successfully instantiate an FT2FONT object out of my
> ARIALUNI.TTF file, but, I didn't know what to do with it at that
> point.
> 
> Help?
> 
> Cheers,
> --Dave Loyall
> Omaha, Nebraska, USA
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to