Title: Underscore character does not exist for cmr10 font · Issue #16995 · matplotlib/matplotlib · GitHub
Open Graph Title: Underscore character does not exist for cmr10 font · Issue #16995 · matplotlib/matplotlib
X Title: Underscore character does not exist for cmr10 font · Issue #16995 · matplotlib/matplotlib
Description: Bug report The bundled font cmr10 (and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according to this website anyways) is actually mappted to the overdot. See this St...
Open Graph Description: Bug report The bundled font cmr10 (and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according to this website anyways) is actu...
X Description: Bug report The bundled font cmr10 (and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according to this website anyways) is ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/16995
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Underscore character does not exist for cmr10 font","articleBody":"### Bug report\r\n\r\nThe bundled font `cmr10` (and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according to [this website](https://unicode-search.net/unicode-namesearch.pl?term=UNDERSCORE) anyways) is actually mappted to the overdot.\r\n\r\nSee [this StackOverflow](https://stackoverflow.com/questions/60974480/underscore-in-label-does-not-render/60975058#60975058) for details, but I'll repeat here.\r\n\r\n**Code for reproduction**\r\n```python\r\nimport matplotlib.pyplot as plt\r\nplt.rcParams.update({\r\n 'font.family': 'serif',\r\n 'font.serif': 'cmr10',\r\n})\r\n\r\nvariable = range(5)\r\nplt.plot(variable, variable, label='test_underscore')\r\nplt.plot(variable, variable, label='escape\\_underscore')\r\nplt.plot(variable, variable, label=r'rawtest_underscore')\r\nplt.plot(variable, variable, label=r'rawescape\\_underscore')\r\n_=plt.legend()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n\r\n\r\n**Expected outcome**\r\n\r\n\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Manjaro 19.0.2\r\n * Matplotlib version: 3.1.3\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): module://ipykernel.pylab.backend_inline\r\n * Python version: 3.7.6\r\n\r\n**Other**\r\n`cmr10` loaded into FontForge shows that:\r\nA) the underscore character doesn't exist\r\nB) the normal underscore character (`005f`) is replaced by the overdot\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/jrwrigh","@type":"Person","name":"jrwrigh"},"datePublished":"2020-04-01T16:04:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/16995/matplotlib/issues/16995"}
| 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:4638a140-b9af-5ba9-b32b-41e94c379d91 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B7C:190D34:A3AA10:DBAA64:6A52B5DC |
| html-safe-nonce | 66e37bb49a903ea4d685b96621b3c5710a0b2ff267c1a705c48a6eae284a55af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjdDOjE5MEQzNDpBM0FBMTA6REJBQTY0OjZBNTJCNURDIiwidmlzaXRvcl9pZCI6IjQxMjAxODMwMDIzNzc2NjM5NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3b64ab58a5ab2cbabaf264958d482a9c7724d0bdca050745a332211f70e0acfe |
| hovercard-subject-tag | issue:592030256 |
| 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/16995/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ebb95a572b3eecddd3e159a669ffbfd45601c7e4d148817628549e98e47e0ab6/matplotlib/matplotlib/issues/16995 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ebb95a572b3eecddd3e159a669ffbfd45601c7e4d148817628549e98e47e0ab6/matplotlib/matplotlib/issues/16995 |
| og:image:alt | Bug report The bundled font cmr10 (and it's associated family) do not contain the underscore character. Instead, the unicode character for the underscore (according to this website anyways) is actu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jrwrigh |
| 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