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

Function test_find_noto

lib/matplotlib/tests/test_font_manager.py:152–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150
151
152def test_find_noto():
153 fp = FontProperties(family=["Noto Sans CJK SC", "Noto Sans CJK JP"])
154 name = Path(findfont(fp)).name
155 if name not in ("NotoSansCJKsc-Regular.otf", "NotoSansCJK-Regular.ttc"):
156 pytest.skip(f"Noto Sans CJK SC font may be missing (found {name})")
157
158 fig, ax = plt.subplots()
159 ax.text(0.5, 0.5, 'Hello, 你好', fontproperties=fp)
160 for fmt in ["raw", "svg", "pdf", "ps"]:
161 fig.savefig(BytesIO(), format=fmt)
162
163
164def test_find_valid():

Callers

nothing calls this directly

Calls 5

FontPropertiesClass · 0.90
PathClass · 0.85
subplotsMethod · 0.45
textMethod · 0.45
savefigMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…