| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This test just checks `get_sfnt_table('head')` for DejaVu Sans, but
there is a more comprehensive test of all SFNT tables in
`test_ft2font.py::test_ft2font_get_sfnt_table`.
Because we previously only asked for a font family (and sometimes a weight/style), mathtext fonts were at the whim of rcParams for all other settings. This could mean that we would look for an non-existent weight, or even set the normal font to italic unintentionally. The fonts that are available for mathtext are (for now) fixed and bundled, and we only intend for them to work with the exact fonts we have. So use more specific fontconfig patterns that should always match the fonts that we have. While it could be possible to simply hard-code these paths relative to our data path, it seems that way back in 157a059, that implementation was changed to `findfont` intentionally to avoid duplicate embeddings.
There was a problem hiding this comment.
I reviewed this last week but seemingly forgot to hit the Submit button.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR summary
Because we previously only asked for a font family (and sometimes a weight/style), mathtext fonts were at the whim of rcParams for all other settings. This could mean that we would look for an non-existent weight, or even set the normal font to italic unintentionally.
The fonts that are available for mathtext are (for now) fixed and bundled, and we only intend for them to work with the exact fonts we have. So use more specific fontconfig patterns that should always match the fonts that we have.
While it could be possible to simply hard-code these paths relative to our data path, it seems that way back in 157a059, that implementation was changed to findfont intentionally to avoid duplicate embeddings.
Also remove a redundant test.
AI Disclosure
None
PR quality check