GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Use CoreText to find macOS fonts by iccir · Pull Request #31977 · matplotlib/matplotlib Conversation
Contributor
Why is this change necessary?Prior to this change, Differences in found fonts
My change uses the However, font_manager.py later re-scans the "/System/Library/Fonts" path, so it should discover these invisible fonts at that time. I tested this change on macOS Mojave (10.14) and macOS Sonoma (14.8). I was unable to test on 10.12 or 10.13 as I updated my 10.12 test device to 10.14. The CoreText API used has been available since 10.5, so I do not foresee any compatibility issues. AI DisclosureThe original C-based implementation in #31965 is my own without any usage of AI. I used AI to help me convert it to C++ and return a PR checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
greglucas
reviewed
Uh oh!
There was an error while loading. Please reload this page.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this be a py::set() call so that you can iterate it on the returning item even on a non macos platform? It is private, so probably not a big deal either way, but you are calling it as
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was trying to mimic the "on other platforms, returns None" in I think I think raising
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
greglucas
approved these changes
Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Greg Lucas <[email protected]>
QuLogic
reviewed
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Co-authored-by: Elliott Sales de Andrade <[email protected]> Co-authored-by: Elliott Sales de Andrade <[email protected]> Co-authored-by: Elliott Sales de Andrade <[email protected]> Co-authored-by: Elliott Sales de Andrade <[email protected]>
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
| |||||||||||||||||||||||||||||||||
There was an error while loading. Please reload this page.
I'm not sure what is going on in the linked bug. My suspicion is one of the following:
I'm leaning towards 1. In any case, our previous implemented ran |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I did some more digging last night.
The new code calls This is a subtle change of behavior, but I'm not sure if the old behavior is correct. There are situations where a user may have multiple user-level fonts installed with the same name and wants to deactivate one of them. Assuming we want to change this behavior, should the version number of the font cache be bumped in font_manager.py? It's currently: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hmm, yes, I think that is correct, as we did the same thing for Windows: #22859 You can bump the cache key to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[MNT]: Possibly use CoreText to find fonts for faster performance font finding in OSX produces 200+ lines of warnings [MNT]: findSystemFonts - Use system API instead to look into folder
There was an error while loading. Please reload this page.