File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import shutil
3
+ import sys
3
4
import tempfile
4
5
import warnings
5
6
@@ -96,3 +97,20 @@ def test_hinting_factor(factor):
96
97
# Check that hinting only changes text layout by a small (10%) amount.
97
98
np .testing .assert_allclose (hinted_font .get_width_height (), expected ,
98
99
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