Skip to content

Commit 442f8d5

Browse files
committed
MNT: Use new defaults in set_font_settings_for_testing
@tacaswell argued that downstreams will already have to contend with changes in text due to FreeType upgrades, so keeping the old hinting defaults doesn't really help with backwards compatibility and makes things different for other projects for no reason. Followup to matplotlib#30161 (review)
1 parent 87ea4e4 commit 442f8d5

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

lib/matplotlib/testing/__init__.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,8 @@
1919

2020
def set_font_settings_for_testing():
2121
mpl.rcParams['font.family'] = 'DejaVu Sans'
22-
# We've changed the default for ourselves here, but for backwards-compatibility, use
23-
# the old setting if not called in our own tests (which would set
24-
# `_called_from_pytest` from our `conftest.py`).
25-
if getattr(mpl, '_called_from_pytest', False):
26-
mpl.rcParams['text.hinting'] = 'default'
27-
mpl.rcParams['text.hinting_factor'] = 1
28-
else:
29-
mpl.rcParams['text.hinting'] = 'none'
30-
mpl.rcParams['text.hinting_factor'] = 8
22+
mpl.rcParams['text.hinting'] = 'default'
23+
mpl.rcParams['text.hinting_factor'] = 1
3124

3225

3326
def set_reproducibility_for_testing():

0 commit comments

Comments
 (0)