Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
As reportedon Launchpad, the combination oftext.usetex=True
,text.latex.unicode=True
, and the svg backend can produce files with missing or wrong characters. A warning does get printed.
Code for reproduction
frompylabimport*pp={'text.usetex':True,'text.latex.unicode':True}rcParams.update(pp)plot(1,1)ylabel(r'\textwon')savefig('tmp.pdf')savefig('tmp.png')savefig('tmp.svg')
Actual outcome
The svg file lacks the won character. A warning like the following is printed:
../lib/matplotlib/textpath.py:389: UserWarning: The glyph (142) of font (/usr/local/texlive/2016/texmf-dist/fonts/type1/public/cm-super/sfss3583.pfb) cannot be converted with the encoding. Glyph may be wrong "be wrong" % (glyph, font_bunch.filename))
Expected outcome
The svg file should include the won character (₩), as the pdf and png files do. I don't think we document usetex as being supported in the svg backend, but for several use cases it works.
Matplotlib version
Current master (3d99e43) installed from git withpip install -e .