Title: svg backend has limited encoding support with usetex · Issue #8068 · matplotlib/matplotlib · GitHub
Open Graph Title: svg backend has limited encoding support with usetex · Issue #8068 · matplotlib/matplotlib
X Title: svg backend has limited encoding support with usetex · Issue #8068 · matplotlib/matplotlib
Description: 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 from...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/8068
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"svg backend has limited encoding support with usetex","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nAs reported [on Launchpad](https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/1438278), 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.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nfrom pylab import *\r\npp={'text.usetex': True, 'text.latex.unicode': True}\r\nrcParams.update(pp)\r\n\r\nplot(1,1)\r\nylabel(r'\\textwon')\r\nsavefig('tmp.pdf')\r\nsavefig('tmp.png')\r\nsavefig('tmp.svg')\r\n```\r\n\r\n**Actual outcome**\r\n\r\nThe svg file lacks the won character. A warning like the following is printed:\r\n\r\n```\r\n../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\r\n \"be wrong\" % (glyph, font_bunch.filename))\r\n```\r\n\r\n**Expected outcome**\r\n\r\nThe 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.\r\n\r\n**Matplotlib version**\r\n\r\nCurrent master (3d99e435d8b74216608f29adf97bafef7e64218c) installed from git with `pip install -e .`\r\n","author":{"url":"https://github.com/jkseppan","@type":"Person","name":"jkseppan"},"datePublished":"2017-02-12T17:54:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/8068/matplotlib/issues/8068"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e08c8933-b9fa-49d1-e315-9848d2e0d92a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C830:3D4A9E:8ECA94:C0FF02:6A52900F |
| html-safe-nonce | 3abd38ba832295df76ab4be0f3a49ba2723f82d29e050238ab07004b996de276 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODMwOjNENEE5RTo4RUNBOTQ6QzBGRjAyOjZBNTI5MDBGIiwidmlzaXRvcl9pZCI6IjY0NjM0MDMzNzI1MDY2ODEzNTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 82650fe96311e09e7d9b50234960fc60b37cf38085901ffe7100c7ca1c69a2a4 |
| hovercard-subject-tag | issue:207066352 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/8068/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7546fe7c93059c4add8c5ed9aab9d1b59663215e81821d36bb4a6008c2b3f514/matplotlib/matplotlib/issues/8068 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7546fe7c93059c4add8c5ed9aab9d1b59663215e81821d36bb4a6008c2b3f514/matplotlib/matplotlib/issues/8068 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jkseppan |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width