File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11import os
22import shutil
3+ import sys
34import tempfile
45import 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"
You can’t perform that action at this time.
0 commit comments