Title: Fallback font doesn't work on windows? · Issue #5929 · matplotlib/matplotlib · GitHub
Open Graph Title: Fallback font doesn't work on windows? · Issue #5929 · matplotlib/matplotlib
X Title: Fallback font doesn't work on windows? · Issue #5929 · matplotlib/matplotlib
Description: This is a test failure matplotlib.tests.test_text.test_font_styles.test which results in an image without any text on it (found as part of #5922) import matplotlib import matplotlib.pyplot as plt %matplotlib inline from matplotlib import...
Open Graph Description: This is a test failure matplotlib.tests.test_text.test_font_styles.test which results in an image without any text on it (found as part of #5922) import matplotlib import matplotlib.pyplot as plt %...
X Description: This is a test failure matplotlib.tests.test_text.test_font_styles.test which results in an image without any text on it (found as part of #5922) import matplotlib import matplotlib.pyplot as plt %...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5929
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fallback font doesn't work on windows?","articleBody":"This is a test failure `matplotlib.tests.test_text.test_font_styles.test` which results in an image without any text on it (found as part of https://github.com/matplotlib/matplotlib/pull/5922)\n\n```\nimport matplotlib\nimport matplotlib.pyplot as plt\n%matplotlib inline\nfrom matplotlib import _get_data_path\ndata_path = _get_data_path()\n\nfrom matplotlib.font_manager import FontProperties, findfont\n\nnormalFont = dict(\n family=\"sans-serif\",\n style=\"normal\",\n variant=\"normal\",\n size=14)\n\nprop = FontProperties(**normalFont)\npath = findfont(prop, directory=data_path)\nprint(path)\nfp = FontProperties(fname=path)\n\nplt.figure()\nax = plt.subplot(1, 1, 1)\n\nax.annotate(\n \"Normal Font\",\n (0.1, 0.1),\n xycoords='axes fraction',\n fontproperties=fp)\n\nax.set_xticks([])\nax.set_yticks([])\n```\n\nThis results in the following output:\n\n```\nC:\\portabel\\miniconda\\envs\\matplotlib_build\\lib\\site-packages\\matplotlib-1.5.1+1064.g4f14fc8-py3.5-win-amd64.egg\\matplotlib\\mpl-data\\fonts\\ttf\\STIXSizOneSymBol.ttf\nc:\\data\\external\\pydata\\matplotlib\\lib\\matplotlib\\font_manager.py:1314: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans\n (prop.get_family(), self.defaultFamily[fontext]))\nc:\\data\\external\\pydata\\matplotlib\\lib\\matplotlib\\font_manager.py:1324: UserWarning: findfont: Could not match :family=DejaVu Sans:style=normal:variant=normal:weight=400:stretch=normal:size=14.0. Returning C:\\portabel\\miniconda\\envs\\matplotlib_build\\lib\\site-packages\\matplotlib-1.5.1+1064.g4f14fc8-py3.5-win-amd64.egg\\matplotlib\\mpl-data\\fonts\\ttf\\STIXSizOneSymBol.ttf\n UserWarning)\nOut[14]: []\n```\n\nThe produces image has not text on it :-(\n","author":{"url":"https://github.com/jankatins","@type":"Person","name":"jankatins"},"datePublished":"2016-01-27T20:38:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/5929/matplotlib/issues/5929"}
| 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:09c2b2ef-0a53-8cbd-fbe7-e22837745489 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9170:3BE023:611868:81D26C:6A5412AC |
| html-safe-nonce | 485afdb5c22aac13dc9a6e5e9927f8e2c1aa075e6c5e9683a93ffbbf945b7a05 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTcwOjNCRTAyMzo2MTE4Njg6ODFEMjZDOjZBNTQxMkFDIiwidmlzaXRvcl9pZCI6IjcxMTU5OTYzNTQzMjE4NDY5NTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9333c5c4b7290e37b9891eac057c9260204be21ee1a87b5c328c74f2829aa2f2 |
| hovercard-subject-tag | issue:129262241 |
| 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/5929/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7e1a0f72ecb4851d0046dec9db7638086eec0058bf8d441691de6997eac8be2a/matplotlib/matplotlib/issues/5929 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7e1a0f72ecb4851d0046dec9db7638086eec0058bf8d441691de6997eac8be2a/matplotlib/matplotlib/issues/5929 |
| og:image:alt | This is a test failure matplotlib.tests.test_text.test_font_styles.test which results in an image without any text on it (found as part of #5922) import matplotlib import matplotlib.pyplot as plt %... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jankatins |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width