| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
EDIT: This is solved now The tests now fail only due to an unrelated issue, and seems to be affecting all recent PRs. FAILED lib/matplotlib/tests/test_image.py::test_huge_range_log[png] - ValueError: Invalid vmin or vmax |
Sorry, something went wrong.
There was a problem hiding this comment.
findfont is public API, so can we just change its return type? At the very least this requires an API change note?
Sorry, something went wrong.
| # The original font is Calibri, if that is not installed, we fall back | ||
| # to Carlito, which is metrically equivalent. | ||
| if 'Calibri' in matplotlib.font_manager.findfont('Calibri:bold'): | ||
| if 'Calibri' in matplotlib.font_manager.findfont('Calibri:bold').keys(): |
There was a problem hiding this comment.
I don't think you need .keys()?
Sorry, something went wrong.
There was a problem hiding this comment.
ah that's right, I was probably searching for findfont usages within mpl and happen to change this eagerly.
Sorry, something went wrong.
Because this is a public API, the return type change is quite huge, which would break things at a lot of places. (including users who don't want their less-relevant part of their work getting messed up, which is also a bit hard to traceback) I've proposed a 'without findfont diff' parsing of all families, which would only change internals of mpl and won't affect end users. see: #20549 I think this PR should still be open for a while until we've got a good look at the other PR's possibilities. |
Sorry, something went wrong.
|
Please reference other relevant PRs in a PR before asking folks to review. I had no idea there were two, and we probably should decide on an approach before reviewing. |
Sorry, something went wrong.
I did? I see a aitikgupta mentioned this pull request 5 days ago just above your review @jklymak On the other hand, the logic still needs to be reviewed (which is mostly similar in this and the other PR), which is also why I didn't convert it into a draft before.. |
Sorry, something went wrong.
|
Folks aren't going to click through every link on a PR. A quick comment here that this was likely superseded by the other PR would have been helpful. |
Sorry, something went wrong.
|
I am going to close this PR because the core of it got merged in #20740 and we have decided to keep the API on findfont unchanged. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
This is the beginning of migrating from Matplotlib's "Font-First" approach to a "Text-First" approach.
The very first step is to parse all families in font manager. Previously, we only parsed families until we find a font file, and the rest of the backends are accustomed to just a single font file (which needs changing)
I'm hoping this breaks many tests, so as to know exactly what to fix at other places.
I've added a bunch of To-Dos (future PRs) and some fixes at some places.
PR Checklist