Title: ps/pdf: Override font height metrics to support AFM files by QuLogic · Pull Request #31371 · matplotlib/matplotlib · GitHub
Open Graph Title: ps/pdf: Override font height metrics to support AFM files by QuLogic · Pull Request #31371 · matplotlib/matplotlib
X Title: ps/pdf: Override font height metrics to support AFM files by QuLogic · Pull Request #31371 · matplotlib/matplotlib
Description: PR summary When outputting files using the "core 14 fonts" (e.g., rcParams['pdf.use14corefonts'] = True), text will be measured using our internal AFM files instead of any external files. While we don't have a full API decided for how to pass full Text objects through backends, add in a small internal helper to allow the PS/PDF backends to override font height metrics with the AFM files. Note, because there is still some small difference in how we calculated line spacing, there is some small difference in the result from before. But it no longer changes results depending on whether Helvetica is installed globally. AI Disclosure None PR checklist [n/a] "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested [n/a] Plotting related features are demonstrated in an example [n/a] New Features and API Changes are noted with a directive and release note [n/a] Documentation complies with general and docstring guidelines
Open Graph Description: PR summary When outputting files using the "core 14 fonts" (e.g., rcParams['pdf.use14corefonts'] = True), text will be measured using our internal AFM files instead of any externa...
X Description: PR summary When outputting files using the "core 14 fonts" (e.g., rcParams['pdf.use14corefonts'] = True), text will be measured using our internal AFM files instea...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/31371
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8238f93f-3b08-556b-1eb4-99dc19ee5eb6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D1C2:2A0782:1C7EDB:25F88B:6A52E655 |
| html-safe-nonce | 64491b62633c40af603d91d7a509886b84ed1e6c44de20011766392b4fc5942e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMUMyOjJBMDc4MjoxQzdFREI6MjVGODhCOjZBNTJFNjU1IiwidmlzaXRvcl9pZCI6IjMxNDk2MTk3NzQ3Mjk5Mzg1MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 66953374bb1bcab8c347e7882758fd18c8fe99b95447397c726f71f58cb88986 |
| hovercard-subject-tag | pull_request:3442308553 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/31371/files |
| twitter:image | https://avatars.githubusercontent.com/u/302469?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/302469?s=400&v=4 |
| og:image:alt | PR summary When outputting files using the "core 14 fonts" (e.g., rcParams['pdf.use14corefonts'] = True), text will be measured using our internal AFM files instead of any externa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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