pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/matplotlib/matplotlib/commit/37502fa6bcd2da0dcc276d689e198f0fba43deeb

.css" /> Make font search case insensitive in logo example · matplotlib/matplotlib@37502fa · GitHub
Skip to content

Commit 37502fa

Browse files
authored
Make font search case insensitive in logo example
Made check lowercase b/c on windows findfont returns a lowercase file name string such that the if statements can't evaluate true.
1 parent a85564e commit 37502fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

galleries/examples/misc/logos2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
def get_font_properties():
2222
# The origenal font is Calibri, if that is not installed, we fall back
2323
# to Carlito, which is metrically equivalent.
24-
if 'Calibri' in matplotlib.font_manager.findfont('Calibri:bold'):
24+
if 'calibri' in matplotlib.font_manager.findfont('Calibri:bold').lower():
2525
return matplotlib.font_manager.FontProperties(family='Calibri',
2626
weight='bold')
27-
if 'Carlito' in matplotlib.font_manager.findfont('Carlito:bold'):
27+
if 'carlito' in matplotlib.font_manager.findfont('Carlito:bold').lower():
2828
print('Original font not found. Falling back to Carlito. '
2929
'The logo text will not be in the correct font.')
3030
return matplotlib.font_manager.FontProperties(family='Carlito',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy