Title: WIP: Fix font selection by tacaswell · Pull Request #8800 · matplotlib/matplotlib · GitHub
Open Graph Title: WIP: Fix font selection by tacaswell · Pull Request #8800 · matplotlib/matplotlib
X Title: WIP: Fix font selection by tacaswell · Pull Request #8800 · matplotlib/matplotlib
Description: This pulls the commits from #8607 and #8551 together and starts to add starts to add code to standardize extracting the weight and style from the 4 places it could be stashed Eventually this the weight / style selection code will look something like fc-list : file > /tmp/font_list.txt from matplotlib import ft2font from matplotlib import font_manager from pathlib import PurePath with open('/tmp/font_list.txt', 'r') as fin: font_paths = [_.strip().strip(':') for _ in fin.readlines()] fonts = [] for fn in font_paths: fn = PurePath(fn) if fn.suffix not in ('.otf', '.ttf'): continue try: ft = ft2font.FT2Font(str(fn)) reasonable_effort_style = [v.lower().split() for v in get_all_style(ft.get_sfnt())] reasonable_effort_style += [ft.style_name.lower().split()] hit_weight = set(k for v in reasonable_effort_style for k in font_manager.weight_dict if k in v) print(ft.family_name, reasonable_effort_style, hit_weight, sep=' | ') except RuntimeError: print('failed') attn @cy18 @Rufflewind
Open Graph Description: This pulls the commits from #8607 and #8551 together and starts to add starts to add code to standardize extracting the weight and style from the 4 places it could be stashed Eventually this the we...
X Description: This pulls the commits from #8607 and #8551 together and starts to add starts to add code to standardize extracting the weight and style from the 4 places it could be stashed Eventually this the we...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/8800
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2a5a9935-5c63-d9bb-6a11-2bae8c1c0399 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BEA4:25E8A1:EFC02F:1483AD3:6A53B469 |
| html-safe-nonce | 7a7542262a2f1f79d0bd9b88ce3bb5fb85b9601ea698a7f2953bad00e9ddafb8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUE0OjI1RThBMTpFRkMwMkY6MTQ4M0FEMzo2QTUzQjQ2OSIsInZpc2l0b3JfaWQiOiIzNDg2MTcxMDg0MTcyMjc2ODQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3b8ed7a160378646eba8ae0ef026c9d962bd17a426479bbd30ebd0d686c39cc3 |
| hovercard-subject-tag | pull_request:127396868 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/8800/files |
| twitter:image | https://avatars.githubusercontent.com/u/199813?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/199813?s=400&v=4 |
| og:image:alt | This pulls the commits from #8607 and #8551 together and starts to add starts to add code to standardize extracting the weight and style from the 4 places it could be stashed Eventually this the we... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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