Title: [Bug]: svg backend does not use configured generic family lists · Issue #23492 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: svg backend does not use configured generic family lists · Issue #23492 · matplotlib/matplotlib
X Title: [Bug]: svg backend does not use configured generic family lists · Issue #23492 · matplotlib/matplotlib
Description: Bug summary The FontProperties family parameter can be a generic family such as sans-serif and the actual font should be looked up in rcParams according to the documentation. Code for reproduction >>> import matplotlib as mpl >>> import ...
Open Graph Description: Bug summary The FontProperties family parameter can be a generic family such as sans-serif and the actual font should be looked up in rcParams according to the documentation. Code for reproduction ...
X Description: Bug summary The FontProperties family parameter can be a generic family such as sans-serif and the actual font should be looked up in rcParams according to the documentation. Code for reproduction ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23492
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: svg backend does not use configured generic family lists","articleBody":"### Bug summary\n\nThe FontProperties family parameter can be a generic family such as sans-serif and the actual font should be looked up in rcParams according to the documentation.\n\n### Code for reproduction\n\n```python\n\u003e\u003e\u003e import matplotlib as mpl\r\n\u003e\u003e\u003e import matplotlib.font_manager as fm\r\n\u003e\u003e\u003e mpl.rcParams[\"font.family\"]\r\n['sans-serif']\r\n\u003e\u003e\u003e mpl.rcParams[\"font.sans-serif\"]\r\n['DejaVu Sans',\r\n 'Bitstream Vera Sans',\r\n 'Computer Modern Sans Serif',\r\n 'Lucida Grande',\r\n 'Verdana',\r\n 'Geneva',\r\n 'Lucid',\r\n 'Arial',\r\n 'Helvetica',\r\n 'Avant Garde',\r\n 'sans-serif']\r\n\u003e\u003e\u003e fp = fm.FontProperties()\r\n\u003cmatplotlib.font_manager.FontProperties at ...\u003e\r\n\u003e\u003e\u003e fp.get_family()\r\n['sans-serif']\n```\n\n\n### Actual outcome\n\n```python\r\n\u003e\u003e\u003e fp.get_family()\r\n['sans-serif']\r\n```\n\n### Expected outcome\n\n```python\r\n\u003e\u003e\u003e fp.get_family()\r\n['DejaVu Sans',\r\n 'Bitstream Vera Sans',\r\n 'Computer Modern Sans Serif',\r\n 'Lucida Grande',\r\n 'Verdana',\r\n 'Geneva',\r\n 'Lucid',\r\n 'Arial',\r\n 'Helvetica',\r\n 'Avant Garde',\r\n 'sans-serif']\r\n```\n\n### Additional information\n\n_No response_\n\n### Operating system\n\nWindows\n\n### Matplotlib Version\n\n3.5.2\n\n### Matplotlib Backend\n\nTkAgg\n\n### Python version\n\n3.9.13\n\n### Jupyter version\n\nN/A\n\n### Installation\n\npip","author":{"url":"https://github.com/l-johnston","@type":"Person","name":"l-johnston"},"datePublished":"2022-07-26T12:50:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":17},"url":"https://github.com/23492/matplotlib/issues/23492"}
| 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:a8f82a2e-82a0-a9bf-02ca-d9eb0221b877 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBA6:80AF9:986ACF:CD0667:6A515B55 |
| html-safe-nonce | 77ed2e20eec456e3700b724b5d69b7ae3417dbde4d85a060ced62807c523044d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkE2OjgwQUY5Ojk4NkFDRjpDRDA2Njc6NkE1MTVCNTUiLCJ2aXNpdG9yX2lkIjoiNTM2MDA0Mzg3MDY0NTIxNDAzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0d9eba678a0c35f354b683ba0bd397359f7b20beb0f326419ad6c8f3efe39859 |
| hovercard-subject-tag | issue:1318197400 |
| 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/23492/issue_layout |
| twitter:image | https://opengraph.githubassets.com/23ca17955c65a31162d7a33de1868fde847dc6e13ba809b4fd4ca5c8218c678e/matplotlib/matplotlib/issues/23492 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/23ca17955c65a31162d7a33de1868fde847dc6e13ba809b4fd4ca5c8218c678e/matplotlib/matplotlib/issues/23492 |
| og:image:alt | Bug summary The FontProperties family parameter can be a generic family such as sans-serif and the actual font should be looked up in rcParams according to the documentation. Code for reproduction ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | l-johnston |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6f17634ed2af1d116850bcea6c63a70a4d72970f33ade1dd3eef3764b7e16994 |
| 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 | 2d32229a0a79708ee9a4f132f630b36d58b4495a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width