MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _test_text_features

Function _test_text_features

lib/matplotlib/tests/test_text.py:1228–1239  ·  view source on GitHub ↗
(fig)

Source from the content-addressed store, hash-verified

1226
1227
1228def _test_text_features(fig):
1229 t = fig.text(1, 0.7, 'Default: fi ffi fl st',
1230 fontsize=32, horizontalalignment='right')
1231 assert t.get_fontfeatures() is None
1232 t = fig.text(1, 0.4, 'Disabled: fi ffi fl st',
1233 fontsize=32, horizontalalignment='right',
1234 fontfeatures=['-liga'])
1235 assert t.get_fontfeatures() == ('-liga', )
1236 t = fig.text(1, 0.1, 'Discretionary: fi ffi fl st',
1237 fontsize=32, horizontalalignment='right')
1238 t.set_fontfeatures(['dlig'])
1239 assert t.get_fontfeatures() == ('dlig', )
1240
1241
1242@image_comparison(['features'], remove_text=False, style='mpl20',

Callers 2

test_text_featuresFunction · 0.85

Calls 3

get_fontfeaturesMethod · 0.80
set_fontfeaturesMethod · 0.80
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…