Title: kerning seems generally wrong · Issue #14887 · matplotlib/matplotlib · GitHub
Open Graph Title: kerning seems generally wrong · Issue #14887 · matplotlib/matplotlib
X Title: kerning seems generally wrong · Issue #14887 · matplotlib/matplotlib
Description: Bug report Bug summary Matplotlib seems to fail to apply kerning correctly. Code for reproduction figtext(.5, .5, "AV", size=36); figtext(.5, .4, "Te", size=36) Actual outcome and similarly for pdf/ps/svg output. Expected outcome with mp...
Open Graph Description: Bug report Bug summary Matplotlib seems to fail to apply kerning correctly. Code for reproduction figtext(.5, .5, "AV", size=36); figtext(.5, .4, "Te", size=36) Actual outcome and similarly for pdf...
X Description: Bug report Bug summary Matplotlib seems to fail to apply kerning correctly. Code for reproduction figtext(.5, .5, "AV", size=36); figtext(.5, .4, "Te", size=36) Actual outcome a...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/14887
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"kerning seems generally wrong","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nMatplotlib seems to fail to apply kerning correctly.\r\n\r\n**Code for reproduction**\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug.\r\nPlease make sure to minimize the number of dependencies required, and provide\r\nany necessary plotted data.\r\nAvoid using threads, as Matplotlib is (explicitly) not thread-safe.--\u003e\r\n\r\n```python\r\nfigtext(.5, .5, \"AV\", size=36); figtext(.5, .4, \"Te\", size=36)\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\nand similarly for pdf/ps/svg output.\r\n\r\n**Expected outcome**\r\n\r\nwith mplcairo, one gets:\r\n\r\n\r\nNote that it's not that matplotlib doesn't apply kerning at all -- there is definitely code a bit everywhere to apply it, but it looks like we're getting wrong values. See also https://matplotlib.org/gallery/misc/font_indexing.html which shows that get_kerning apparently returns 0 when it shouldn't.\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: linux\r\n * Matplotlib version: master\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): agg/mplcairo\r\n * Python version: 37\r\n * Jupyter version (if applicable):\r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2019-07-25T10:40:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/14887/matplotlib/issues/14887"}
| 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:db9be8a4-5613-e277-5cdb-3230c62d8273 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BAD2:2E411E:139DDCB:1A5FB46:6A534751 |
| html-safe-nonce | f8134a0f9a7a5e55f76a835fafa720c5c95bca5d5e26238fb7f5862b93d8387f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUQyOjJFNDExRToxMzlERENCOjFBNUZCNDY6NkE1MzQ3NTEiLCJ2aXNpdG9yX2lkIjoiMTc2NDYyNzY2MTE0MjkzNTg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8519d5da4a55b4a62a5dd04dccfaae0a2669f555cc05faaf7bbd04eea2e16087 |
| hovercard-subject-tag | issue:472793081 |
| 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/14887/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d5cc404b7ef58015cc67081d5dd49b8061ab2b3d0066b11ad4fb1ac02183c2cf/matplotlib/matplotlib/issues/14887 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d5cc404b7ef58015cc67081d5dd49b8061ab2b3d0066b11ad4fb1ac02183c2cf/matplotlib/matplotlib/issues/14887 |
| og:image:alt | Bug report Bug summary Matplotlib seems to fail to apply kerning correctly. Code for reproduction figtext(.5, .5, "AV", size=36); figtext(.5, .4, "Te", size=36) Actual outcome and similarly for pdf... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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