| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
|
||
| # if fontfile is a ttc, specify font number | ||
| if fontfile.endswith(".ttc"): | ||
| options.font_number = 0 |
There was a problem hiding this comment.
This is extracting from the first font in the collection correct?
Sorry, something went wrong.
There was a problem hiding this comment.
I believe so; the count starts from 0.
Sorry, something went wrong.
|
Can you add a comment about why this works? Do we have access to any ttc fonts on CI so we can test this? |
Sorry, something went wrong.
|
It should be possible to add a ttc-file, e.g. embedding the existing ttf-file (and possibly another ttf-file, just to actually make it a collection of ttfs, I can probably make an additional ttf with a single glyph or something...). |
Sorry, something went wrong.
|
Oh, there is a test for ttc already, so there is a ttc font available for testing. matplotlib/lib/matplotlib/tests/test_font_manager.py Lines 113 to 120 in 940cc2c Based on #9787 it seems like the first font is already selected, even though it is not clear from the code how that happens. |
Sorry, something went wrong.
…284-on-v3.5.x Backport PR #22284 on branch v3.5.x (Specify font number for TTC font subsetting)
| Back | FazBrowse Home | New Git URL |
PR Summary
Since #20804 isn't merged yet, the commit 1b53070 can go as a hotfix for #21893.
PR Checklist
Tests and Styling