diff --git a/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst b/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst index 083f78e9d375..c195dfd2d057 100644 --- a/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst +++ b/doc/api/next_api_changes/2018-08-17-AL-deprecations.rst @@ -6,4 +6,5 @@ The following API elements are deprecated: - ``get_py2exe_datafiles``, ``tk_window_focus``, - ``backend_ps.PsBackendHelper``, ``backend_ps.ps_backend_helper``, - ``cbook.iterable``, +- ``font_manager.OSXInstalledFonts``, - ``mlab.demean``, diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py index b95a9f1b1ee6..d3ecae9f653d 100644 --- a/lib/matplotlib/font_manager.py +++ b/lib/matplotlib/font_manager.py @@ -209,6 +209,7 @@ def win32InstalledFonts(directory=None, fontext='ttf'): return None +@cbook.deprecated("3.1") def OSXInstalledFonts(directories=None, fontext='ttf'): """Get list of font files on OS X.""" if directories is None: @@ -263,10 +264,9 @@ def findSystemFonts(fontpaths=None, fontext='ttf'): fontfiles.update(win32InstalledFonts(fontext=fontext)) else: fontpaths = X11FontDirectories - fontfiles.update(get_fontconfig_fonts(fontext)) - # check for OS X & load its fonts if present if sys.platform == 'darwin': - fontfiles.update(OSXInstalledFonts(fontext=fontext)) + fontpaths = [*X11FontDirectories, *OSXFontDirectories] + fontfiles.update(get_fontconfig_fonts(fontext)) elif isinstance(fontpaths, str): fontpaths = [fontpaths]