Skip to content

Commit 9d27272

Browse files
committed
Set text hinting to defaults
Namely, `text.hinting` is now `default` instead of `force_autohint` (or `none` for classic tests) and `text.hinting_factor` is now 1, not 8.
1 parent 729afa4 commit 9d27272

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/matplotlib/mpl-data/matplotlibrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@
296296
## ("native" is a synonym.)
297297
## - force_autohint: Use FreeType's auto-hinter. ("auto" is a synonym.)
298298
## - no_hinting: Disable hinting. ("none" is a synonym.)
299-
#text.hinting: force_autohint
299+
#text.hinting: default
300300

301-
#text.hinting_factor: 8 # Specifies the amount of softness for hinting in the
301+
#text.hinting_factor: 1 # Specifies the amount of softness for hinting in the
302302
# horizontal direction. A value of 1 will hint to full
303303
# pixels. A value of 2 will hint to half pixels etc.
304304
#text.kerning_factor: 0 # Specifies the scaling factor for kerning values. This

lib/matplotlib/mpl-data/stylelib/_classic_test_patch.mplstyle

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
ytick.alignment: center_baseline
55

66
hatch.color: edge
7+
8+
text.hinting: default
9+
text.hinting_factor: 1

lib/matplotlib/testing/decorators.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ def wrapper(*args, extension, request, **kwargs):
213213

214214
img = _ImageComparisonBase(func, tol=tol, remove_text=remove_text,
215215
savefig_kwargs=savefig_kwargs)
216-
matplotlib.testing.set_font_settings_for_testing()
216+
if not getattr(matplotlib, '_called_from_pytest', False):
217+
matplotlib.testing.set_font_settings_for_testing()
217218

218219
with _collect_new_figures() as figs:
219220
func(*args, **kwargs)

0 commit comments

Comments
 (0)