From 442f8d53c867b3859a35e382fe0ca1025bcc47d9 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 10 Apr 2026 19:23:00 -0400 Subject: [PATCH] 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 https://github.com/matplotlib/matplotlib/pull/30161#pullrequestreview-4090935810 --- lib/matplotlib/testing/__init__.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/matplotlib/testing/__init__.py b/lib/matplotlib/testing/__init__.py index 9fcdb6aeee03..9de9785d2b5f 100644 --- a/lib/matplotlib/testing/__init__.py +++ b/lib/matplotlib/testing/__init__.py @@ -19,15 +19,8 @@ def set_font_settings_for_testing(): mpl.rcParams['font.family'] = 'DejaVu Sans' - # We've changed the default for ourselves here, but for backwards-compatibility, use - # the old setting if not called in our own tests (which would set - # `_called_from_pytest` from our `conftest.py`). - if getattr(mpl, '_called_from_pytest', False): - mpl.rcParams['text.hinting'] = 'default' - mpl.rcParams['text.hinting_factor'] = 1 - else: - mpl.rcParams['text.hinting'] = 'none' - mpl.rcParams['text.hinting_factor'] = 8 + mpl.rcParams['text.hinting'] = 'default' + mpl.rcParams['text.hinting_factor'] = 1 def set_reproducibility_for_testing():