Title: Available fonts are ignored by font_manager · Issue #10201 · matplotlib/matplotlib · GitHub
Open Graph Title: Available fonts are ignored by font_manager · Issue #10201 · matplotlib/matplotlib
X Title: Available fonts are ignored by font_manager · Issue #10201 · matplotlib/matplotlib
Description: There are two issues: font_manager is not finding fonts that are in the system > this is easily resolved by rebuilding the cache, which perhaps should be a default True as it is very fast to do it seems. even when the font is found, Matp...
Open Graph Description: There are two issues: font_manager is not finding fonts that are in the system > this is easily resolved by rebuilding the cache, which perhaps should be a default True as it is very fast to do it ...
X Description: There are two issues: font_manager is not finding fonts that are in the system > this is easily resolved by rebuilding the cache, which perhaps should be a default True as it is very fast to do ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10201
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Available fonts are ignored by font_manager","articleBody":"There are two issues: \r\n\r\n1) font_manager is not finding fonts that are in the system \u003e this is easily resolved by rebuilding the cache, which perhaps should be a default True as it is very fast to do it seems. \r\n\r\n2) even when the font is found, Matplotlib forcefully choose one of the default fonts \u003e I did not find a resolution for this.\r\n\r\nThe font_manager utility seems to have some issues in exposing fonts that are installed in the system to matplotlib. For example: \r\n\r\n```\r\nfrom matplotlib import font_manager\r\nfont_manager.findfont('Noto Sans Tibetan')\r\n```\r\nIs referring to a font that I have in the system, and this yields:\r\n\r\n`'/Users/mikko/dev/boke/lib/python3.6/site-packages/matplotlib/mpl-data/fonts/ttf/STIXNonUni.ttf'`\r\n\r\n(BTW: it is very strange to get this path, as it refers to totally separate virtualenv than the one I'm executing these commands from!?)\r\n\r\nSo for some reason, it forcefully ignores the font that I have. To prove the point, I will try the same with made up font name: \r\n\r\n`font_manager.findfont('sdfdsfds')`\r\n\r\n`/Users/mikko/dev/fontest/lib/python3.6/site-packages/matplotlib/font_manager.py:1320: UserWarning: findfont: Font family ['sdfdsfds'] not found. Falling back to DejaVu Sans`\r\n\r\nTo get this far i.e. being able to identify the font I have in the first place, I needed to do: \r\n\r\n`font_manager.findfont('Noto Sans Tibetan', rebuild_if_missing=True)`\r\n\r\nAny suggestion for overcoming this?\r\n ","author":{"url":"https://github.com/mikkokotila","@type":"Person","name":"mikkokotila"},"datePublished":"2018-01-09T14:19:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":39},"url":"https://github.com/10201/matplotlib/issues/10201"}
| 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:a22c03c7-c278-c63e-f141-882c37a7b5d7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6AA:3AC8D5:19997D:23A190:6A51128C |
| html-safe-nonce | e8024bac63d78e98d250111901c2a64c665098b0cfba72cc754eab91f85424c2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkFBOjNBQzhENToxOTk5N0Q6MjNBMTkwOjZBNTExMjhDIiwidmlzaXRvcl9pZCI6IjQxNTg1MDI3NTIxMzIwNzYxNzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1432bc376223e1344a1379d6f823f43d50e63cdaa9cd01e9e72009b42d36dc7b |
| hovercard-subject-tag | issue:287104344 |
| 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/10201/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b7487dc4b1196a267dcfc91ef0f34b858aa79edebb6e894c0f86f7bff4e8168a/matplotlib/matplotlib/issues/10201 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b7487dc4b1196a267dcfc91ef0f34b858aa79edebb6e894c0f86f7bff4e8168a/matplotlib/matplotlib/issues/10201 |
| og:image:alt | There are two issues: font_manager is not finding fonts that are in the system > this is easily resolved by rebuilding the cache, which perhaps should be a default True as it is very fast to do it ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mikkokotila |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| 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 | f9137f6d981cbbfd780af369f80ce890b2d0d2d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width