File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ def list_fonts(directory, extensions):
154
154
extensions = ["." + ext for ext in extensions ]
155
155
return [str (path )
156
156
for path in filter (Path .is_file , Path (directory ).glob ("**/*.*" ))
157
- if path .suffix in extensions ]
157
+ if path .suffix . lower () in extensions ]
158
158
159
159
160
160
def win32FontDirectory ():
@@ -186,7 +186,7 @@ def win32InstalledFonts(directory=None, fontext='ttf'):
186
186
if directory is None :
187
187
directory = win32FontDirectory ()
188
188
189
- fontext = get_fontext_synonyms (fontext )
189
+ fontext = [ '.' + ext for ext in get_fontext_synonyms (fontext )]
190
190
191
191
items = set ()
192
192
for fontdir in MSFontDirectories :
@@ -239,9 +239,9 @@ def _call_fc_list():
239
239
def get_fontconfig_fonts (fontext = 'ttf' ):
240
240
"""List the font filenames known to `fc-list` having the given extension.
241
241
"""
242
- fontext = get_fontext_synonyms (fontext )
242
+ fontext = [ '.' + ext for ext in get_fontext_synonyms (fontext )]
243
243
return [fname for fname in _call_fc_list ()
244
- if Path (fname ).suffix [ 1 :] in fontext ]
244
+ if Path (fname ).suffix . lower () in fontext ]
245
245
246
246
247
247
def findSystemFonts (fontpaths = None , fontext = 'ttf' ):
You can’t perform that action at this time.
0 commit comments