-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
svg backend has limited encoding support with usetex #8068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Labeling this as hard as fixing it will likely involve understanding a whole lot about text encoding. |
I believe I'm also experiencing this issue. In my case, I'm completely missing "fl" from a word in the SVG. I suspect this "fl" is a ligature in LaTeX and thus, possibly, treated as a special character (like the original report). In the generated SVG file, I can see
which is correct. Using matplotlib version 2.1.2 installed via conda, with the following settings: mpl.rc('text', usetex=True)
mpl.rcParams['text.latex.preamble'] = [
r'\usepackage{amsmath}',
r'\usepackage{helvet}',
r'\usepackage[EULERGREEK]{sansmath}',
r'\sansmath',
r'\renewcommand{\familydefault}{\sfdefault}',
r'\usepackage[T1]{fontenc}',
r'\usepackage{graphicx}'
] |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Thanks for the update @QuLogic |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug summary
As reported on Launchpad, the combination of
text.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
Actual outcome
The svg file lacks the won character. A warning like the following is printed:
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 with
pip install -e .
The text was updated successfully, but these errors were encountered: