cannot use some fonts on pdf, ps, eps backends
When I use Arial Unicode MS within matplotlib, it cannot save to any PostScript-based formats (pdf, eps, ps). Apparently, the font has no glyph names:
Traceback (most recent call last):
File “G:\Chem2009\GK6 Fan Dynamics\plotFanCurve.py”, line 31, in
p.savefig('memo/figures/normalizedFanCurve.pdf')
File “C:\Python25\lib\site-packages\matplotlib\pyplot.py”, line 345, in savefig
return fig.savefig(*args, **kwargs)
File “C:\Python25\lib\site-packages\matplotlib\figure.py”, line 990, in savefig
self.canvas.print_figure(*args, **kwargs)
File “C:\Python25\lib\site-packages\matplotlib\backend_bases.py”, line 1419, in print_figure
**kwargs)
File “C:\Python25\lib\site-packages\matplotlib\backend_bases.py”, line 1313, in print_pdf
return pdf.print_pdf(*args, **kwargs)
File “C:\Python25\lib\site-packages\matplotlib\backends\backend_pdf.py”, line 1886, in print_pdf
self.figure.draw(renderer)
File “C:\Python25\lib\site-packages\matplotlib\figure.py”, line 772, in draw
for a in self.axes: a.draw(renderer)
File “C:\Python25\lib\site-packages\matplotlib\axes.py”, line 1601, in draw
a.draw(renderer)
File “C:\Python25\lib\site-packages\matplotlib\axis.py”, line 725, in draw
self.label.draw(renderer)
File “C:\Python25\lib\site-packages\matplotlib\text.py”, line 502, in draw
ismath=ismath)
File “C:\Python25\lib\site-packages\matplotlib\backends\backend_pdf.py”, line 1573, in draw_text
return draw_text_woven(chunks)
File “C:\Python25\lib\site-packages\matplotlib\backends\backend_pdf.py”, line 1543, in draw_text_woven
glyph_name = font.get_glyph_name(gind)
RuntimeError: Face has no glyph names
I can reproduce this error with several fonts on my system. (Coincidentally, all the fonts that have a full set of superscript characters, which I could really use for my plots.) I know that these fonts can be included in PDFs, because I can do it in other programs. I also checked the archives and the bug list for clues as to what may be going on, but came up empty. Any idea what the problem might be? Thanks!
Andrew