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

Function test_font_dejavusans

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

Source from the content-addressed store, hash-verified

482 reason="LaTeX lacks DejaVuSans package")
483@image_comparison(["font-dejavusans.pdf"], style='_classic_test')
484def test_font_dejavusans():
485 # DejaVuSans uses the seac operator to compose characters with diacritics
486 mpl.rcParams['text.latex.preamble'] = '\n'.join((
487 r'\usepackage{DejaVuSans}',
488 r'\usepackage[T1]{fontenc}',
489 r'\usepackage[utf8]{inputenc}'
490 ))
491
492 fig, ax = plt.subplots()
493 ax.text(0.1, 0.1, r"\textsf{ñäö ABCDabcd}", usetex=True, fontsize=50)
494 ax.text(0.1, 0.3, r"\textsf{fi ffl 1234}", usetex=True, fontsize=50)
495 ax.set_xticks([])
496 ax.set_yticks([])
497
498
499@pytest.mark.skipif(not _has_tex_package("charter"),

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
set_xticksMethod · 0.80
set_yticksMethod · 0.80
subplotsMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…