Title: [Bug]: FontManager doesn't get pinging.ttc · Issue #27705 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: FontManager doesn't get pinging.ttc · Issue #27705 · matplotlib/matplotlib
X Title: [Bug]: FontManager doesn't get pinging.ttc · Issue #27705 · matplotlib/matplotlib
Description: Bug summary /System/Library/Fonts/PingFang.ttc is the macOS default Chinese font. The file is a collection of three family names representing three regional glyph variants, PingFang SC, PingFang HK, and PingFang TC. FontManager doesn't s...
Open Graph Description: Bug summary /System/Library/Fonts/PingFang.ttc is the macOS default Chinese font. The file is a collection of three family names representing three regional glyph variants, PingFang SC, PingFang HK...
X Description: Bug summary /System/Library/Fonts/PingFang.ttc is the macOS default Chinese font. The file is a collection of three family names representing three regional glyph variants, PingFang SC, PingFang HK...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/27705
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: FontManager doesn't get pinging.ttc ","articleBody":"### Bug summary\r\n\r\n`/System/Library/Fonts/PingFang.ttc` is the macOS default Chinese font. The file is a collection of three family names representing three regional glyph variants, PingFang SC, PingFang HK, and PingFang TC. FontManager doesn't seem to be able to find the SC family inside; I haven't tried the others yet.\r\n\r\n(Manually constructing a fontProperties works, as demonstrated in https://github.com/matplotlib/matplotlib/issues/20251#issuecomment-843943883. However, it's not a solution for well-encapsulated code from other people.)\r\n\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\nmatplotlib.rcParams['font.family'] = ['Ubuntu', 'PingFang SC', 'sans-serif']\r\nplt.title('你好世界world')\r\nplt.savefig(\"test.png\")\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\nindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\n/private/tmp/1.py:5: UserWarning: Glyph 20320 (\\N{CJK UNIFIED IDEOGRAPH-4F60}) missing from current font.\r\n plt.savefig(\"test.png\")\r\n/private/tmp/1.py:5: UserWarning: Glyph 22909 (\\N{CJK UNIFIED IDEOGRAPH-597D}) missing from current font.\r\n plt.savefig(\"test.png\")\r\n/private/tmp/1.py:5: UserWarning: Glyph 19990 (\\N{CJK UNIFIED IDEOGRAPH-4E16}) missing from current font.\r\n plt.savefig(\"test.png\")\r\n/private/tmp/1.py:5: UserWarning: Glyph 30028 (\\N{CJK UNIFIED IDEOGRAPH-754C}) missing from current font.\r\n plt.savefig(\"test.png\")\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\nfindfont: Font family 'PingFang SC' not found.\r\n```\r\n\r\n\r\n\r\n### Expected outcome\r\n\r\nThe text should not be thin rectangles.\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nmacOS\r\n\r\n### Matplotlib Version\r\n\r\n3.8.2\r\n\r\n### Matplotlib Backend\r\n\r\nMacOSX\r\n\r\n### Python version\r\n\r\nPython 3.11.6\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\npip","author":{"url":"https://github.com/Artoria2e5","@type":"Person","name":"Artoria2e5"},"datePublished":"2024-01-26T11:26:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/27705/matplotlib/issues/27705"}
| 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:870cb024-e207-ff4d-01d3-a3139fb2845a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D052:220E77:103C871:160C1A9:6A5228DB |
| html-safe-nonce | bb1041446cdd8d5d94addb99a40aec4be501b3107af5045fa0f46d655817f4eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDUyOjIyMEU3NzoxMDNDODcxOjE2MEMxQTk6NkE1MjI4REIiLCJ2aXNpdG9yX2lkIjoiNTUzNjAxNTY3Mjk2OTE0NDU0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a427d7ee7dee1e4c8a21a8b99cccdfc7337d156f5747b496c104a2280170412f |
| hovercard-subject-tag | issue:2102062861 |
| 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/27705/issue_layout |
| twitter:image | https://opengraph.githubassets.com/333b7182bc6498b6954056328a81e84fee3e472ca5d68114d3769bf554ce4eb9/matplotlib/matplotlib/issues/27705 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/333b7182bc6498b6954056328a81e84fee3e472ca5d68114d3769bf554ce4eb9/matplotlib/matplotlib/issues/27705 |
| og:image:alt | Bug summary /System/Library/Fonts/PingFang.ttc is the macOS default Chinese font. The file is a collection of three family names representing three regional glyph variants, PingFang SC, PingFang HK... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Artoria2e5 |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width