Skip to content

Make font search case insensitive in logo example#31385

Merged
QuLogic merged 2 commits intomainfrom
logo-fontsearch
Mar 27, 2026
Merged

Make font search case insensitive in logo example#31385
QuLogic merged 2 commits intomainfrom
logo-fontsearch

Conversation

@story645
Copy link
Member

@story645 story645 commented Mar 25, 2026

PR summary

findfont returns a lowercase filepath such that on windows the check for the font will always return false. So I put the entire check into lowercase. I'm sure there are probably better/more efficient ways to do this, but I'd save that for a rework of this whole page. My guess is that this is also what's going wrong on the docs page: https://matplotlib.org/devdocs/gallery/misc/logos2.html

Also b/c I was using the gui, I made the patch branch here instead of on my fork. 🤦‍♀️ sorry!

AI Disclosure

nope

PR checklist

Made check lowercase b/c on windows findfont returns a lowercase file name string such that the if statements can't evaluate true.
@story645 story645 added the Documentation: examples files in galleries/examples label Mar 25, 2026
@jklymak
Copy link
Member

jklymak commented Mar 26, 2026

Feel free to self-merge if you think the test failures are spurious (I assume they are)

@QuLogic
Copy link
Member

QuLogic commented Mar 26, 2026

My guess is that this is also what's going wrong on the docs page: https://matplotlib.org/devdocs/gallery/misc/logos2.html

Is there something wrong with the doc page? If you mean the warning, Calibri isn't available on Linux and we don't try to install it on Circle, so it should be falling back to Carlito..

@story645
Copy link
Member Author

Calibri isn't available on Linux and we don't try to install it on Circle

I feel like we should be using our logo font in our canonical logo example

@QuLogic
Copy link
Member

QuLogic commented Mar 26, 2026

🤷 Then we shouldn't have used a proprietary font that prevents us from doing so.

explain why the web docs are using the fallback, mostly to demystify why we're showing an example that is displaying an error like message.
@story645
Copy link
Member Author

Added a second commit explaining why fallback b/c I think it's not great to have an unexplained what looks like an error message like message in published docs.

@QuLogic QuLogic added this to the v3.11.0 milestone Mar 27, 2026
@QuLogic QuLogic merged commit 9e38f54 into main Mar 27, 2026
29 of 45 checks passed
@QuLogic QuLogic deleted the logo-fontsearch branch March 27, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: examples files in galleries/examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants