Title: [Bug]: Font fallback bugs · Issue #32063 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Font fallback bugs · Issue #32063 · matplotlib/matplotlib
X Title: [Bug]: Font fallback bugs · Issue #32063 · matplotlib/matplotlib
Description: Bug summary If the global font size is set with plt.rcParams["font.size"] and the size value >12, the Chinese charaters will show, else the Chinese characteres will disappear. Code for reproduction import numpy as np import matplotlib.py...
Open Graph Description: Bug summary If the global font size is set with plt.rcParams["font.size"] and the size value >12, the Chinese charaters will show, else the Chinese characteres will disappear. Code for reproduction...
X Description: Bug summary If the global font size is set with plt.rcParams["font.size"] and the size value >12, the Chinese charaters will show, else the Chinese characteres will disappear. Code for...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/32063
X: @github
Domain: Github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Font fallback bugs","articleBody":"### Bug summary\n\nIf the global font size is set with plt.rcParams[\"font.size\"] and the size value \u003e12, the Chinese charaters will show, else the Chinese characteres will disappear.\n\n\n\n\n### Code for reproduction\n\n```Python\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nplt.rcParams[\"font.family\"] = [\"Times New Roman\", \"SimSun\"]\nplt.rcParams[\"font.serif\"] = [\"Times New Roman\", \"SimSun\"]\nplt.rcParams[\"font.sans-serif\"] = [\"Times New Roman\", \"SimSun\", \"Arial\", \"SimHei\"]\n\nplt.rcParams[\"mathtext.fontset\"] = \"custom\"\nplt.rcParams[\"axes.unicode_minus\"] = False\nplt.rcParams[\"font.size\"] = 13 # If font size \u003c= 12, the Chinese characters will not show.\n\nx = np.array([1, 2, 3, 4, 5])\ny = np.array([1, 4, 9, 16, 25])\n\nplt.plot(x, y)\nplt.xlabel('X-axis / X 轴')\nplt.ylabel('Y-axis / Y 轴')\nplt.title('Font Style Example / 字体样式示例')\nplt.show()\n```\n\n### Actual outcome\n\n\"# plt.rcParams[\"font.size\"] = 13\" \n\n\u003cimg width=\"639\" height=\"558\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/a83eec59-8d29-47d7-b028-1374a4776676\" /\u003e\n\n\n\"plt.rcParams[\"font.size\"] = 13\" \n\u003cimg width=\"836\" height=\"848\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/43a1ac15-1ace-4da3-9f89-83579bee860b\" /\u003e\n\n### Expected outcome\n\nFont fallback can work correctly. The text containing Chinese characters and Non-Chinese characters can be diplayed with SimSun font and Time New Roman font, respectively.\n\n### Additional information\n\nFont fallback is incompatible for SimSun and Times New Roman fonts.\n\n### Operating system\n\nWindows\n\n### Matplotlib Version\n\n3.11.0\n\n### Matplotlib Backend\n\ntkagg\n\n### Python version\n\n3.14.6\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nuv","author":{"url":"https://github.com/dragoneptech","@type":"Person","name":"dragoneptech"},"datePublished":"2026-07-18T10:23:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/32063/matplotlib/issues/32063"}
| 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:4597dc16-6246-c1a5-686b-74177a2c21a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6B6:DA2D0:BC11A8:10DCAF4:6A631CD5 |
| html-safe-nonce | ee627f4ea4ab5915d3ab7e6c3abeb75a94e078afdbaef08158f4dede8cc45f8c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkI2OkRBMkQwOkJDMTFBODoxMERDQUY0OjZBNjMxQ0Q1IiwidmlzaXRvcl9pZCI6Ijc1OTIyMjMyOTQ0NzA5NTQxOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d6c9d67d7904bdc9186bcec633f66d94edfabeb9e64d84c2d7ee57dfc07d51fd |
| hovercard-subject-tag | issue:4917856319 |
| 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/32063/issue_layout |
| twitter:image | https://opengraph.githubassets.com/78124724c3ecfbc9d8940bd8140b90134e305e5dd5595e079645fa13934ab52e/matplotlib/matplotlib/issues/32063 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/78124724c3ecfbc9d8940bd8140b90134e305e5dd5595e079645fa13934ab52e/matplotlib/matplotlib/issues/32063 |
| og:image:alt | Bug summary If the global font size is set with plt.rcParams["font.size"] and the size value >12, the Chinese charaters will show, else the Chinese characteres will disappear. Code for reproduction... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dragoneptech |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6 |
| 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 | 6a93e25585f487ddff9e3996c06d5b869d6e1828 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width