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

Function test_ttc_output

lib/matplotlib/tests/test_backend_pgf.py:359–370  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357@pytest.mark.backend('pgf')
358@image_comparison(['ttc_pgf.pdf'], style='mpl20')
359def test_ttc_output():
360 fp = FontProperties(family=['WenQuanYi Zen Hei'])
361 if Path(findfont(fp)).name != 'wqy-zenhei.ttc':
362 pytest.skip('Font wqy-zenhei.ttc may be missing')
363
364 fonts = {'sans-serif': 'WenQuanYi Zen Hei', 'monospace': 'WenQuanYi Zen Hei Mono'}
365 plt.rc('font', size=16, **fonts)
366
367 figs = plt.figure(figsize=(7, len(fonts) / 2)).subfigures(len(fonts))
368 for font, fig in zip(fonts.values(), figs):
369 fig.text(0.5, 0.5, f'{font}: {string.ascii_uppercase}', font=font,
370 horizontalalignment='center', verticalalignment='center')
371
372
373@needs_pgf_xelatex

Callers

nothing calls this directly

Calls 6

FontPropertiesClass · 0.90
PathClass · 0.85
subfiguresMethod · 0.80
figureMethod · 0.80
valuesMethod · 0.80
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…