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

Function _test_complex_shaping

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

Source from the content-addressed store, hash-verified

1202
1203
1204def _test_complex_shaping(fig):
1205 # Raqm is Arabic for writing; note that because Arabic is RTL, the characters here
1206 # may seem to be in a different order than expected, but libraqm will order them
1207 # correctly for us.
1208 text = (
1209 'Arabic: \N{Arabic Letter REH}\N{Arabic FATHA}\N{Arabic Letter QAF}'
1210 '\N{Arabic SUKUN}\N{Arabic Letter MEEM}')
1211 math_signs = '\N{N-ary Product}\N{N-ary Coproduct}\N{N-ary summation}\N{Integral}'
1212 text = math_signs + text + math_signs
1213 fig.text(0.5, 0.75, text, size=32, ha='center', va='center')
1214 # Also check fallback behaviour:
1215 # - English should use cmr10
1216 # - Math signs should use DejaVu Sans Display (and thus be larger than the rest)
1217 # - Arabic should use DejaVu Sans
1218 fig.text(0.5, 0.25, text, size=32, ha='center', va='center',
1219 family=['cmr10', 'DejaVu Sans Display', 'DejaVu Sans'])
1220
1221
1222@image_comparison(['complex'], extensions=['png', 'pdf', 'svg', 'eps'], style='mpl20')

Callers 2

test_complex_shapingFunction · 0.85

Calls 1

textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…