diff --git a/doc/api/next_api_changes/deprecations.rst b/doc/api/next_api_changes/deprecations.rst index 4719e944aedf..98b556bf3fa4 100644 --- a/doc/api/next_api_changes/deprecations.rst +++ b/doc/api/next_api_changes/deprecations.rst @@ -163,3 +163,9 @@ This ticker is deprecated. *required*, *forbidden* and *allowed* parameters of `.cbook.normalize_kwargs` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These parameters are deprecated. + +The ``TTFPATH`` and ``AFMPATH`` environment variables +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Support for the (undocumented) ``TTFPATH`` and ``AFMPATH`` environment +variables is deprecated. Additional fonts may be registered using +``matplotlib.font_manager.fontManager.addfont()``. diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py index 5033fe550592..bea02d5856c3 100644 --- a/lib/matplotlib/font_manager.py +++ b/lib/matplotlib/font_manager.py @@ -971,6 +971,9 @@ def __init__(self, size=None, weight='normal'): paths.extend(ttfpath.split(':')) else: paths.append(ttfpath) + cbook.warn_deprecated( + "3.3", name=pathname, obj_type="environment variable", + alternative="FontManager.addfont()") _log.debug('font search path %s', str(paths)) # Load TrueType fonts and create font dictionary.