Skip to content

Commit 5914990

Browse files
authored
Merge pull request #15943 from anntzer/ttfafmpath
Deprecate the TTFPATH & AFMPATH environment variables.
2 parents bb4b823 + ec7a731 commit 5914990

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/api/next_api_changes/deprecations.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,9 @@ This ticker is deprecated.
163163
*required*, *forbidden* and *allowed* parameters of `.cbook.normalize_kwargs`
164164
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165165
These parameters are deprecated.
166+
167+
The ``TTFPATH`` and ``AFMPATH`` environment variables
168+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169+
Support for the (undocumented) ``TTFPATH`` and ``AFMPATH`` environment
170+
variables is deprecated. Additional fonts may be registered using
171+
``matplotlib.font_manager.fontManager.addfont()``.

lib/matplotlib/font_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,9 @@ def __init__(self, size=None, weight='normal'):
971971
paths.extend(ttfpath.split(':'))
972972
else:
973973
paths.append(ttfpath)
974+
cbook.warn_deprecated(
975+
"3.3", name=pathname, obj_type="environment variable",
976+
alternative="FontManager.addfont()")
974977
_log.debug('font search path %s', str(paths))
975978
# Load TrueType fonts and create font dictionary.
976979

0 commit comments

Comments
 (0)