<div dir="ltr">I am having trouble reproducing this, you might want to raise this issue with the Fedora folks as they do some funny stuff with fonts + packaging mpl.<div><br></div><div>Tom</div><div><br></div>PS this list has moved to <a href="mailto:matplotlib-users@python.org">matplotlib-users@python.org</a><div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 6, 2015 at 8:43 AM Neal Becker <<a href="mailto:ndbecker2@gmail.com">ndbecker2@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Neal Becker wrote:<br>
<br>
> Using mpl 1.4.3 on Fedora 22, I'm trying to use stix font (so I can render<br>
> the unicode lambda label on the x-axis).  I have every fedora package<br>
> related to 'stix', I think. It displays ok in qtagg4, but if I try to save<br>
> to pdf if fails with<br>
><br>
> RuntimeError  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Traceback (most recent call<br>
> last) <ipython-input-2-7dee58c07264> in <module>()<br>
> ----> 1 exec(open(r'/usr/tmp/python-8710q1Y.py').read()) # PYTHON-MODE<br>
><br>
> <string> in <module>()<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/pyplot.py in savefig(*args,<br>
> **kwargs)<br>
>  Â  Â 575 def savefig(*args, **kwargs):<br>
>  Â  Â 576  Â  Â fig = gcf()<br>
> --> 577  Â  Â res = fig.savefig(*args, **kwargs)<br>
>  Â  Â 578  Â  Â draw()  Â # need this if 'transparent=True' to reset colors<br>
>  Â  Â 579  Â  Â return res<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/figure.py in savefig(self,<br>
> *args, **kwargs)<br>
>  Â  1474  Â  Â  Â  Â  Â  Â self.set_frameon(frameon)<br>
>  Â  1475<br>
> -> 1476  Â  Â  Â  Â self.canvas.print_figure(*args, **kwargs)<br>
>  Â  1477<br>
>  Â  1478  Â  Â  Â  Â if frameon:<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/backend_bases.py in<br>
> print_figure(self, filename, dpi, facecolor, edgecolor, orientation,<br>
> format, **kwargs)<br>
>  Â  2209  Â  Â  Â  Â  Â  Â  Â  Â orientation=orientation,<br>
>  Â  2210  Â  Â  Â  Â  Â  Â  Â  Â bbox_inches_restore=_bbox_inches_restore,<br>
> -> 2211  Â  Â  Â  Â  Â  Â  Â  Â **kwargs)<br>
>  Â  2212  Â  Â  Â  Â finally:<br>
>  Â  2213  Â  Â  Â  Â  Â  Â if bbox_inches and restore_bbox:<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in<br>
> print_pdf(self, filename, **kwargs)<br>
>  Â  2489  Â  Â  Â  Â  Â  Â  Â  Â file.endStream()<br>
>  Â  2490  Â  Â  Â  Â  Â  Â else:  Â  Â  Â  Â  Â  # we opened the file above; now<br>
>  Â  finish<br>
> it off<br>
> -> 2491  Â  Â  Â  Â  Â  Â  Â  Â file.close()<br>
>  Â  2492<br>
>  Â  2493<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in<br>
> close(self)<br>
>  Â  Â 523  Â  Â  Â  Â self.endStream()<br>
>  Â  Â 524  Â  Â  Â  Â # Write out the various deferred objects<br>
> --> 525  Â  Â  Â  Â self.writeFonts()<br>
>  Â  Â 526  Â  Â  Â  Â self.writeObject(self.alphaStateObject,<br>
>  Â  Â 527  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  dict([(val[0], val[1])<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in<br>
> writeFonts(self)<br>
>  Â  Â 626  Â  Â  Â  Â  Â  Â  Â  Â chars = self.used_characters.get(stat_key)<br>
>  Â  Â 627  Â  Â  Â  Â  Â  Â  Â  Â if chars is not None and len(chars[1]):<br>
> --> 628  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â fonts[Fx] = self.embedTTF(realpath, chars[1])<br>
>  Â  Â 629  Â  Â  Â  Â self.writeObject(self.fontObject, fonts)<br>
>  Â  Â 630<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in<br>
> embedTTF(self, filename, characters)<br>
>  Â  1101<br>
>  Â  1102  Â  Â  Â  Â if fonttype == 3:<br>
> -> 1103  Â  Â  Â  Â  Â  Â return embedTTFType3(font, characters, descriptor)<br>
>  Â  1104  Â  Â  Â  Â elif fonttype == 42:<br>
>  Â  1105  Â  Â  Â  Â  Â  Â return embedTTFType42(font, characters, descriptor)<br>
><br>
> /usr/lib64/python3.4/site-packages/matplotlib/backends/backend_pdf.py in<br>
> embedTTFType3(font, characters, descriptor)<br>
>  Â  Â 887  Â  Â  Â  Â  Â  Â # actual outlines)<br>
>  Â  Â 888  Â  Â  Â  Â  Â  Â rawcharprocs = ttconv.get_pdf_charprocs(<br>
> --> 889  Â  Â  Â  Â  Â  Â  Â  Â filename.encode(sys.getfilesystemencoding()),<br>
> glyph_ids)<br>
>  Â  Â 890  Â  Â  Â  Â  Â  Â charprocs = {}<br>
>  Â  Â 891  Â  Â  Â  Â  Â  Â for charname, stream in six.iteritems(rawcharprocs):<br>
><br>
> RuntimeError: TrueType font is missing table<br>
><br>
<br>
forgot to attach the code.<br>
<br>
<br>
#!/usr/bin/python<br>
# -*- coding: utf-8 -*-<br>
data='''carriers,lambda,per<br>
1,7,1.3e-4<br>
1,8,3.0e-4<br>
1,9,.0014<br>
8,7,4.8e-4<br>
8,8,1.3e-3<br>
8,9,.0075<br>
'''<br>
<br>
import pandas as pd<br>
try:<br>
  Â  from StringIO import StringIO<br>
except ImportError:<br>
  Â  from io import StringIO<br>
df = pd.read_csv (StringIO (data))<br>
g = df.groupby ('carriers')<br>
import matplotlib.pyplot as plt<br>
<br>
import matplotlib as mpl<br>
#mpl.rcParams['font.family'] = 'stix'<br>
mpl.rc('font', family='DejaVu Sans')<br>
#mpl.rc('font', family='stix')<br>
<br>
import itertools<br>
markers = itertools.cycle(['o','s','v'])<br>
<br>
fig = plt.figure()<br>
ax = fig.add_subplot(111)<br>
for c, stuff in g:<br>
  Â  plt.semilogy (stuff['lambda'].values, stuff['per'].values,<br>
label='carriers=%s'%c, marker=next(markers))<br>
<br>
plt.legend (loc='best')<br>
ax.set_xlabel (' ')<br>
ax.set_ylabel ('per')<br>
plt.grid(which='major', linestyle='solid')<br>
plt.grid(which='minor', linestyle='dashed')<br>
plt.savefig ('per_vs_lambda.pdf')<br>
<br>
<br>
<br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Don't Limit Your Business. Reach for the Cloud.<br>
GigeNET's Cloud Solutions provide you with the tools and support that<br>
you need to offload your IT needs and focus on growing your business.<br>
Configured For All Businesses. Start Your Cloud Today.<br>
<a href="https://www.gigenetcloud.com/" rel="noreferrer" target="_blank">https://www.gigenetcloud.com/</a><br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@lists.sourceforge.net" target="_blank">Matplotlib-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a><br>
</blockquote></div></div></div>