Title: [Bug]: PDF Type 42 output regression in 3.11: excessive font embedding and fl rendered as a ligature · Issue #31955 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: PDF Type 42 output regression in 3.11: excessive font embedding and fl rendered as a ligature · Issue #31955 · matplotlib/matplotlib
X Title: [Bug]: PDF Type 42 output regression in 3.11: excessive font embedding and fl rendered as a ligature · Issue #31955 · matplotlib/matplotlib
Description: Bug summary After upgrading from Matplotlib 3.9.4 to 3.11.0, PDF files generated with the default DejaVu Sans font and pdf.fonttype = 42 became significantly larger. Additionally, words containing the character sequence fl (for example, ...
Open Graph Description: Bug summary After upgrading from Matplotlib 3.9.4 to 3.11.0, PDF files generated with the default DejaVu Sans font and pdf.fonttype = 42 became significantly larger. Additionally, words containing ...
X Description: Bug summary After upgrading from Matplotlib 3.9.4 to 3.11.0, PDF files generated with the default DejaVu Sans font and pdf.fonttype = 42 became significantly larger. Additionally, words containing ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/31955
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: PDF Type 42 output regression in 3.11: excessive font embedding and fl rendered as a ligature","articleBody":"### Bug summary\n\nAfter upgrading from Matplotlib 3.9.4 to 3.11.0, PDF files generated with the default\n`DejaVu Sans` font and `pdf.fonttype = 42` became significantly larger.\n\nAdditionally, words containing the character sequence `fl` (for example, `Ecoflow`)\nare rendered with a ligature, while this did not happen with Matplotlib 3.9.x.\n\nThe same code, data, and font are used in both versions.\n\n### Expected behavior\n\n- PDF size should remain similar to Matplotlib 3.9.4.\n- The text `Ecoflow` should be rendered as separate `f` and `l` glyphs.\n- Only the required font subset should be embedded.\n\n### Actual behavior\n\nWith Matplotlib 3.11.0:\n\n- PDF size increases.\n- The sequence `fl` is rendered as a ligature.\n- The issue only occurs when using `pdf.fonttype = 42`.\n\n**Working configuration:**\n\n- Python: **3.9.13**\n- Matplotlib: **3.9.4**\n\n**Affected configuration:**\n\n- Python: **3.14.6**\n- Matplotlib: **3.11.0**\n\n\n### Code for reproduction\n\n```Python\nimport matplotlib\nfrom matplotlib.figure import Figure\n\nmatplotlib.rcParams['pdf.fonttype'] = 42\nmatplotlib.rcParams['pdf.compression'] = 9\n\nfig = Figure()\nax = fig.subplots()\n\nax.set_title(\"Ecoflow\")\n\nfig.savefig(\"ligature-bug.pdf\")\n```\n\n### Actual outcome\n\n\u003cimg width=\"882\" height=\"188\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a7464948-1d21-49b7-a625-c9d753af4ea8\" /\u003e\n\n### Expected outcome\n\n\u003cimg width=\"900\" height=\"224\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2fbf7bca-0863-491e-bdd0-c5e7bd3dc3d8\" /\u003e\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nDebian\n\n### Matplotlib Version\n\n3.11.0\n\n### Matplotlib Backend\n\nagg\n\n### Python version\n\nPython 3.14.6\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/smirnovhub","@type":"Person","name":"smirnovhub"},"datePublished":"2026-06-26T20:55:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/31955/matplotlib/issues/31955"}
| 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:5768334e-2bb4-bae9-d9b0-479758f2a544 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2C8:CD446:30F1F37:437E1A4:6A4F25F4 |
| html-safe-nonce | 735fae5687e2ee72239fd9c97f4c74974c4b483e4e3af505d0042be8b8f39c24 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkM4OkNENDQ2OjMwRjFGMzc6NDM3RTFBNDo2QTRGMjVGNCIsInZpc2l0b3JfaWQiOiIyNzcwOTgwODg2NzUyOTk0ODA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0a3eddf8f9f30e4cce85f9bd33e92d7c8817f35ac3a514f8b20beceb3bbdb5c1 |
| hovercard-subject-tag | issue:4755087932 |
| 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/31955/issue_layout |
| twitter:image | https://opengraph.githubassets.com/21ca69f77f4ed8b45f8133ceb718251421f56854f7dde104676e30c14a8e62a0/matplotlib/matplotlib/issues/31955 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/21ca69f77f4ed8b45f8133ceb718251421f56854f7dde104676e30c14a8e62a0/matplotlib/matplotlib/issues/31955 |
| og:image:alt | Bug summary After upgrading from Matplotlib 3.9.4 to 3.11.0, PDF files generated with the default DejaVu Sans font and pdf.fonttype = 42 became significantly larger. Additionally, words containing ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | smirnovhub |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| 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 | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width