matplotlib/matplotlib — pull request #2523 by mdboom (2013-10-16 16:54:22+00:00)
Title: Unicode issue in EPS output when using custom font

If I do:

```
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

plt.rcParams['font.family'] = 'Georgia'

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.scatter([1,2,3],[1,2,3])
fig.savefig('test.eps')
```

I get:

```
Traceback (most recent call last):
File "test_helvetica.py", line 10, in
fig.savefig('test.eps')
File "/Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-x86_64.egg/matplotlib/figure.py", line 1439, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-x86_64.egg/matplotlib/backend_bases.py", line 2228, in print_figure
**kwargs)
File "/Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-x86_64.egg/matplotlib/backend_bases.py", line 1953, in print_eps
return ps.print_eps(*args, **kwargs)
File "/Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-x86_64.egg/matplotlib/backends/backend_ps.py", line 982, in print_eps
return self._print_ps(outfile, 'eps', *args, **kwargs)
File "/Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-x86_64.egg/matplotlib/backends/backend_ps.py", line 1010, in _print_ps
**kwargs)
File "/Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-x86_64.egg/matplotlib/backends/backend_ps.py", line 1208, in _print_figure
print_figure_impl()
File "/Users/tom/Library/Python/2.7/lib/python/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-x86_64.egg/matplotlib/backends/backend_ps.py", line 1159, in print_figure_impl
fh, fonttype, glyph_ids)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 13: invalid start byte
```

This is using the latest developer version of Matplotlib (a3d2992e2af170313834f922f2212201e2c61a2a at the time of writing). I can save it to PDF and convert to PS with ``pdf2ps`` but it would be nice to be able to save to EPS directly.