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

Function test_ft2font_get_sfnt

lib/matplotlib/tests/test_ft2font.py:546–555  ·  view source on GitHub ↗
(font_name, expected)

Source from the content-addressed store, hash-verified

544@pytest.mark.parametrize('font_name, expected', _expected_sfnt_names.items(),
545 ids=_expected_sfnt_names.keys())
546def test_ft2font_get_sfnt(font_name, expected):
547 file = fm.findfont(font_name)
548 font = ft2font.FT2Font(file)
549 sfnt = font.get_sfnt()
550 for name, value in expected.items():
551 # Macintosh, Unicode 1.0, English, name.
552 assert sfnt.pop((1, 0, 0, name)) == value.encode('ascii')
553 # Microsoft, Unicode, English United States, name.
554 assert sfnt.pop((3, 1, 1033, name)) == value.encode('utf-16be')
555 assert sfnt == {}
556
557
558_expected_sfnt_tables = {

Callers

nothing calls this directly

Calls 2

findfontMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…