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

Appearance settings

Commit 5969311

Browse filesBrowse files
Add test
1 parent 897a3ae commit 5969311
Copy full SHA for 5969311

File tree

Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed

‎lib/matplotlib/tests/test_font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_font_manager.py
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import shutil
3+
import sys
34
import tempfile
45
import warnings
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+
def test_utf16m_sfnt():
105+
segoe_ui_semibold = None
106+
for f in fontManager.ttflist:
107+
# seguisbi = Microsoft Segoe UI Semibold
108+
if f.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+
assert segoe_ui_semibold.weight == "semibold"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.