Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b02905a

Browse files
committed
Minor adjustments to font manager implementation
- Change note - Make function private
1 parent b7acfb2 commit b02905a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/matplotlib/font_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def win32RegistryFonts(reg_domain, base_dir):
223223
return items
224224

225225

226-
def win32InstalledFonts(directory=None, fontext='ttf'):
226+
def _win32InstalledFonts(directory=None, fontext='ttf'):
227227
"""
228228
Search for fonts in the specified font directory, or use the
229229
system directories if none given. Additionally, it is searched for user
@@ -301,7 +301,7 @@ def findSystemFonts(fontpaths=None, fontext='ttf'):
301301
if sys.platform == 'win32':
302302
fontpaths = MSUserFontDirectories + [win32FontDirectory()]
303303
# now get all installed fonts directly...
304-
fontfiles.update(win32InstalledFonts(fontext=fontext))
304+
fontfiles.update(_win32InstalledFonts(fontext=fontext))
305305
else:
306306
fontpaths = X11FontDirectories
307307
if sys.platform == 'darwin':

lib/matplotlib/tests/test_font_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def test_find_ttc():
130130
def test_user_fonts():
131131
if not os.environ.get('APPVEYOR', False):
132132
pytest.xfail('This test does only work on appveyor since user fonts '
133-
'are Windows specific')
133+
'are Windows specific and the developer\'s font '
134+
'directory should remain unchanged')
134135

135136
font_test_file = 'mpltest.ttf'
136137

0 commit comments

Comments
 (0)