matplotlib/matplotlib — pull request #2089 by mdboom (2013-06-07 17:58:48+00:00)
Title: RuntimeError: Unknown C++ exception in several examples using PS or PDF backends on Windows

Using matplotlib-1.3.0rc on Windows with PDF or PS backends, the following examples are failing with `RuntimeError: Unknown C++ exception`:
* pylab_examples\\findobj_demo.py
* pylab_examples\\fonts_demo.py
* pylab_examples\\fonts_demo_kw.py
* pylab_examples\\text_handles.py
* api\\font_family_rc.py

For example, tracebacks for font_family_rc.py using PDF and PS backends:
```
driving ..\api\font_family_rc.py
Traceback (most recent call last):
File "_tmp_font_family_rc.py", line 41, in
savefig(r"pdf\font_family_rc", dpi=150)
File "X:\Python27-x64\lib\site-packages\matplotlib\pyplot.py", line 561, in savefig
return fig.savefig(*args, **kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\figure.py", line 1410, in savefig
self.canvas.print_figure(*args, **kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\backend_bases.py", line 2220, in print_figure
**kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_pdf.py", line 2346, in print_pdf
file.close()
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_pdf.py", line 507, in close
self.writeFonts()
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_pdf.py", line 607, in writeFonts
fonts[Fx] = self.embedTTF(realpath, chars[1])
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_pdf.py", line 1052, in embedTTF
return embedTTFType3(font, characters, descriptor)
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_pdf.py", line 844, in embedTTFType3
rawcharprocs = ttconv.get_pdf_charprocs(filename, glyph_ids)
RuntimeError: Unknown C++ exception
```

```
driving ..\api\font_family_rc.py
Traceback (most recent call last):
File "_tmp_font_family_rc.py", line 41, in
savefig(r"ps\font_family_rc", dpi=150)
File "X:\Python27-x64\lib\site-packages\matplotlib\pyplot.py", line 561, in savefig
return fig.savefig(*args, **kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\figure.py", line 1410, in savefig
self.canvas.print_figure(*args, **kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\backend_bases.py", line 2220, in print_figure
**kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_ps.py", line 977, in print_ps
return self._print_ps(outfile, 'ps', *args, **kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_ps.py", line 1008, in _print_ps
**kwargs)
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_ps.py", line 1200, in _print_figure
print_figure_impl()
File "X:\Python27-x64\lib\site-packages\matplotlib\backends\backend_ps.py", line 1163, in print_figure_impl
convert_ttf_to_ps(font_filename, raw_fh, fonttype, glyph_ids)
RuntimeError: Unknown C++ exception
```