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

Function test_use14corefonts

lib/matplotlib/tests/test_backend_pdf.py:25–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24@image_comparison(['pdf_use14corefonts.pdf'], style='_classic_test')
25def test_use14corefonts():
26 rcParams['pdf.use14corefonts'] = True
27 rcParams['font.family'] = 'sans-serif'
28 rcParams['font.size'] = 8
29 rcParams['font.sans-serif'] = ['Helvetica']
30 rcParams['pdf.compression'] = 0
31
32 text = '''A three-line text positioned just above a blue line
33and containing some French characters and the euro symbol:
34"Merci pépé pour les 10 €"'''
35
36 fig, ax = plt.subplots()
37 ax.set_title('Test PDF backend with option use14corefonts=True')
38 ax.text(0.5, 0.5, text, horizontalalignment='center',
39 verticalalignment='bottom',
40 fontsize=14)
41 ax.axhline(0.5, linewidth=0.5)
42
43
44def test_multipage_pagecount():

Callers

nothing calls this directly

Calls 4

axhlineMethod · 0.80
subplotsMethod · 0.45
set_titleMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…