Skip to content

Commit 1f6d78f

Browse files
handle None for antialiasing when not specified
1 parent f11c92c commit 1f6d78f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/mathtext.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import functools
1919
import logging
2020

21+
import matplotlib as mpl
2122
from matplotlib import _api, _mathtext
2223
from matplotlib.ft2font import LOAD_NO_HINTING
2324
from matplotlib.font_manager import FontProperties
@@ -74,6 +75,8 @@ def parse(self, s, dpi=72, prop=None, antialiased=None):
7475
# is mutable; key the cache using an internal copy (see
7576
# text._get_text_metrics_with_cache for a similar case).
7677
prop = prop.copy() if prop is not None else None
78+
if antialiased is None:
79+
antialiased = mpl.rcParams['text.antialiased']
7780
return self._parse_cached(s, dpi, prop, antialiased)
7881

7982
@functools.lru_cache(50)

0 commit comments

Comments
 (0)