Greetings. The attached script saves three EPS files (also attached) of a figure containing a text object using the Liberation Sans font. In the three EPS files, the text object contains no spaces, a normal space, and a non-breaking space, respectively. Ghostscript handles the first and third files but not the second, for which it gives the message "Error: /undefined in --get--" at the Postscript "show" instruction for the text. I noticed that the second file embeds a character for the non-breaking space "uni00A0" but not the normal space, so I suppose that's why the error is occurring. I tried a few other fonts and did not see any problems. I have matplotlib v. 1.0.0, Python 2.6.5, and Liberation fonts 1.06.0.20100721. Would someone kindly look into whether this might be a bug with matplotlib or the Liberation fonts? Many thanks!
import matplotlib.pyplot as plt fig = plt.figure() txt = fig.text(0.5, 0.5, 'sometext', ha='center', va='center', family='Liberation Sans') fig.savefig('mpl-eps-liberation-nospace.eps') txt.set_text('some text') fig.savefig('mpl-eps-liberation-space.eps') txt.set_text(u'some\u00A0text') fig.savefig('mpl-eps-liberation-nbspace.eps')
mpl-eps-liberation-nospace.eps
Description: PostScript document
mpl-eps-liberation-space.eps
Description: PostScript document
mpl-eps-liberation-nbspace.eps
Description: PostScript document
mpl-eps-liberation-space.out
Description: Binary data
------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel