Skip to content

Commit 09e9719

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 dbd2de9 commit 09e9719

File tree

1,118 files changed

+32209
-30353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,118 files changed

+32209
-30353
lines changed

lib/matplotlib/mpl-data/matplotlibrc

Lines changed: 2 additions & 2 deletions
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

Lines changed: 3 additions & 0 deletions
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/__init__.py

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

2020
def set_font_settings_for_testing():
2121
mpl.rcParams['font.family'] = 'DejaVu Sans'
22-
mpl.rcParams['text.hinting'] = 'none'
23-
mpl.rcParams['text.hinting_factor'] = 8
22+
if getattr(mpl, '_called_from_pytest', False):
23+
mpl.rcParams['text.hinting'] = 'default'
24+
mpl.rcParams['text.hinting_factor'] = 1
25+
else:
26+
mpl.rcParams['text.hinting'] = 'none'
27+
mpl.rcParams['text.hinting_factor'] = 8
2428

2529

2630
def set_reproducibility_for_testing():
-278 Bytes
-1.21 KB
-7.48 KB
-211 Bytes
-5.79 KB
-2.76 KB
-1.13 KB

0 commit comments

Comments
 (0)