Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5969311

Browse files
Add test
1 parent897a3ae commit5969311

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎lib/matplotlib/tests/test_font_manager.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
importos
22
importshutil
3+
importsys
34
importtempfile
45
importwarnings
56

@@ -96,3 +97,20 @@ def test_hinting_factor(factor):
9697
# Check that hinting only changes text layout by a small (10%) amount.
9798
np.testing.assert_allclose(hinted_font.get_width_height(),expected,
9899
rtol=0.1)
100+
101+
102+
@pytest.mark.xfail(sys.platform!="win32",
103+
reason="Need Windows font to test against")
104+
deftest_utf16m_sfnt():
105+
segoe_ui_semibold=None
106+
forfinfontManager.ttflist:
107+
# seguisbi = Microsoft Segoe UI Semibold
108+
iff.fname[-12:]=="seguisbi.ttf":
109+
segoe_ui_semibold=f
110+
break
111+
else:
112+
pytest.xfail(reason="Couldn't find font to test against.")
113+
114+
# Check that we successfully read the "semibold" from the font's
115+
# sfnt table and set its weight accordingly
116+
assertsegoe_ui_semibold.weight=="semibold"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp