Title: issues parsing AFM fonts · Issue #12987 · matplotlib/matplotlib · GitHub
Open Graph Title: issues parsing AFM fonts · Issue #12987 · matplotlib/matplotlib
X Title: issues parsing AFM fonts · Issue #12987 · matplotlib/matplotlib
Description: Investigating the linux failures in #12982 discovered that we are not parsing AFM files correctly. https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf for reference... weird values for underline information. Ther...
Open Graph Description: Investigating the linux failures in #12982 discovered that we are not parsing AFM files correctly. https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf for reference... weir...
X Description: Investigating the linux failures in #12982 discovered that we are not parsing AFM files correctly. https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf for reference... weir...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/12987
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"issues parsing AFM fonts","articleBody":"Investigating the linux failures in #12982 discovered that we are not parsing AFM files correctly.\r\n\r\nhttps://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf for reference...\r\n\r\n1. weird values for underline information. There are some files which have lines like\r\n ```\r\n UnderlinePosition -41,5039\r\n UnderlineThickness 43,9453\r\n ```\r\n where we expect this to be a \"number\" which can a decimal, we are expecting to cast to float (see page 10 in the pdf). An example of this (on arch) is `/usr/share/texmf-dist/fonts/afm/public/dejavu/DejaVuSansCondensed-BoldOblique.afm`\r\n2. It seems that there are strings encoded as latin-1 (`b'Notice' b'Copyright (c) Typographer Mediengestaltung, 2000. All rights reserved. Zallman-Caps \\xa9 1991 by D. Rakowski.'` to get in ©. According to the first section of the linked pdf AFM files are ASCII encoded.\r\n 3. ~Some fonts are parsing with weights that are not in the weight dictionary (which is what caused the \r\n failure on azure~ \r\n ```python\r\n In [7]: [(f.fname, f.weight) for f in fm.afmlist if f.weight not in matplotlib.font_manager.weight_dict]\r\n Out[7]: \r\n [('/usr/share/texmf-dist/fonts/afm/public/aurical/AuriocusKalligraphicusRslant.afm',\r\n 'reverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/AuriocusKalligraphicusSlant.afm',\r\n 'oblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/AmiciLogoRslant.afm',\r\n 'reverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/prodint/prodint.afm', 'plain'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/LukasSvatbaSlant.afm',\r\n 'oblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/JanaSkrivanaRslant.afm',\r\n 'reverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/txfontsb/FreeSerifb-SmallCapsAlt.afm',\r\n 'smallcaps'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/LukasSvatbaRslant.afm',\r\n 'reverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/cochineal/Cochineal-Italic.afm',\r\n 'italic'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/LukasSvatbaBoldRslant.afm',\r\n 'boldreverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/tex-gyre/qcsbi.afm', 'bolditalic'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/JanaSkrivanaBoldRslant.afm',\r\n 'boldreverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/mathpazo/fplmbb.afm',\r\n 'blackboardbold'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/dejavu/DejaVuSans-ExtraLight.afm',\r\n 'extra-light'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/JanaSkrivanaBoldSlant.afm',\r\n 'boldoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/AuriocusKalligraphicusBoldRslant.afm',\r\n 'boldreverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/AuriocusKalligraphicusBoldSlant.afm',\r\n 'boldoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/AmiciLogoSlant.afm',\r\n 'oblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/txfontsb/FreeSerifb-SmallCaps.afm',\r\n 'smallcaps'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/AmiciLogoBoldRslant.afm',\r\n 'boldreverseoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/AmiciLogoBoldSlant.afm',\r\n 'boldoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/LukasSvatbaBoldSlant.afm',\r\n 'boldoblique'),\r\n ('/usr/share/texmf-dist/fonts/afm/public/aurical/JanaSkrivanaSlant.afm',\r\n 'oblique')]\r\n \r\n ```\r\n there are mostly weight that should have been split into a weight + a slant or weight + style.\r\n","author":{"url":"https://github.com/tacaswell","@type":"Person","name":"tacaswell"},"datePublished":"2018-12-14T05:18:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/12987/matplotlib/issues/12987"}
| 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:ef6cce7f-77e2-b23d-bd2a-aa32f5295a37 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87A2:215443:EDDF6B:13E7F52:6A532F08 |
| html-safe-nonce | 78e074ef54c1778dc05e0fbf3b0711fd45811192d0670c5a09b9430031f1138c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0EyOjIxNTQ0MzpFRERGNkI6MTNFN0Y1Mjo2QTUzMkYwOCIsInZpc2l0b3JfaWQiOiI5Mjk5NTA0MjY3MDI0OTE0MDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f0df20cd549683e1d56adc3aeca83c73af36da16a66bc56ce18a2595d96651c7 |
| hovercard-subject-tag | issue:390969085 |
| 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/12987/issue_layout |
| twitter:image | https://opengraph.githubassets.com/958c1c55d62cd2379339881227a07070ac033b3ccb1dd3a81f66f5d9bd07b918/matplotlib/matplotlib/issues/12987 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/958c1c55d62cd2379339881227a07070ac033b3ccb1dd3a81f66f5d9bd07b918/matplotlib/matplotlib/issues/12987 |
| og:image:alt | Investigating the linux failures in #12982 discovered that we are not parsing AFM files correctly. https://www.adobe.com/content/dam/acom/en/devnet/font/pdfs/5004.AFM_Spec.pdf for reference... weir... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tacaswell |
| 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