Closed
Description
The FreeSerif font produces strange output when hinting is disabled. This is not a default configuration (which is force_autohint
), but is set when building tests.
import matplotlib.pyplot as plt
plt.rcParams['text.hinting'] = 'none' # 'force_autohint'
fig, ax = plt.subplots()
kw = {'font': 'freeserif', 'fontsize': 14}
# characters where Free Serif uses various scales and linear transforms
# e.g. the right paren is a reflected left paren
ax.text(.05, .1, "parens, FAX, u with two diacritics: ()℻ǘ", **kw)
ax.text(.05, .2, "double arrows LURD, single arrows LURD: ⇐⇑⇒⇓←↑→↓", **kw)
ax.text(.05, .3, "corner arrows, wreath product: ↴↵≀", **kw)
ax.set_xticks([])
ax.set_yticks([])
fig.savefig(f'hinting-{plt.rcParams["text.hinting"]}.png')
fig.savefig(f'hinting-{plt.rcParams["text.hinting"]}.pdf')
fig.savefig(f'hinting-{plt.rcParams["text.hinting"]}.svg')
Originally posted by @jkseppan in #18081 (comment)