| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
... and use `FontProperties.from_pattern()` instead. `FontProperties(pattern)` was an overloaded API that easily conflicts with `FontProperties(family)`. The parameter was assumed to be a pattern if it was a string and the only parameter.
|
See also the item starting with "The FP constructor is a bit a mess..." at #10249, I guess. |
Sorry, something went wrong.
|
Sure. We could do __init__(pattern=None, /, *, family=None, ...). Notes:
|
Sorry, something went wrong.
In the single-arg case, I would try calling parse_fontconfig_pattern, then if it raises, treat as a family (and warn) (If it doesn't raise, this can also occur if the family and the pattern are identical, e.g. "Times" parses as {"family": "Times"}.) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
... and use FontProperties.from_pattern() instead.
FontProperties(pattern) was an overloaded API that easily conflicts with FontProperties(family). The parameter was assumed to be a pattern if it was a string and the only parameter.
Noted in #28836 (review).