Title: Wrong reader in mathext.py · Issue #7106 · matplotlib/matplotlib · GitHub
Open Graph Title: Wrong reader in mathext.py · Issue #7106 · matplotlib/matplotlib
X Title: Wrong reader in mathext.py · Issue #7106 · matplotlib/matplotlib
Description: This bug happens when drawing a figure when using AFM fonts (ps.useafm=True) and setting ScalarFormatter(useMathText=True), The _sanity_check() function in aft.py requires a BufferedReader, while the "_get_font()" function in mathext.py ...
Open Graph Description: This bug happens when drawing a figure when using AFM fonts (ps.useafm=True) and setting ScalarFormatter(useMathText=True), The _sanity_check() function in aft.py requires a BufferedReader, while t...
X Description: This bug happens when drawing a figure when using AFM fonts (ps.useafm=True) and setting ScalarFormatter(useMathText=True), The _sanity_check() function in aft.py requires a BufferedReader, while t...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7106
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong reader in mathext.py","articleBody":"This bug happens when drawing a figure when using AFM fonts (ps.useafm=True) and setting ScalarFormatter(useMathText=True), \n\nThe _sanity_check() function in aft.py requires a BufferedReader, while the \"_get_font()\" function in mathext.py returns TextIOWrapper \n\nif cached_font is None:\n fname = os.path.join(self.basepath, basename + \".afm\")\n with open(fname, 'r') as fd:\n print(fd)\n cached_font = AFM(fd)\n cached_font.fname = fname\n self.fonts[basename] = cached_font\n self.fonts[cached_font.get_fontname()] = cached_font\n return cached_font\n\nThe line \"with open(fname, 'r') as fd:\" should be \"with open(fname, 'rb') as fd:\"\n","author":{"url":"https://github.com/lijunsun","@type":"Person","name":"lijunsun"},"datePublished":"2016-09-13T21:45:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/7106/matplotlib/issues/7106"}
| 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:708ba5d2-b0fe-6e29-b318-099959ca91b1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A776:2F0FE8:2EABF93:3ECEFD1:6A53C1FE |
| html-safe-nonce | 5fc6f37f2de23b24c72ce38050b3681e66b42c0fdfdfcf0b03ae5d4bc852ea73 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzc2OjJGMEZFODoyRUFCRjkzOjNFQ0VGRDE6NkE1M0MxRkUiLCJ2aXNpdG9yX2lkIjoiNDgxNzAxMjcwODUyNzU1NTA3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fe585a1f14781b1db4e9db34f47c2a3de5c0292510ecf69bb74b8c56a20edb7e |
| hovercard-subject-tag | issue:176758723 |
| 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/7106/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae997925851224b0a975c31683b9c9fb1af858429598b757460c196d1315cab3/matplotlib/matplotlib/issues/7106 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae997925851224b0a975c31683b9c9fb1af858429598b757460c196d1315cab3/matplotlib/matplotlib/issues/7106 |
| og:image:alt | This bug happens when drawing a figure when using AFM fonts (ps.useafm=True) and setting ScalarFormatter(useMathText=True), The _sanity_check() function in aft.py requires a BufferedReader, while t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lijunsun |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width