@@ -31,6 +31,29 @@ def test_sysfont(self):
31
31
32
32
pygame .font .SysFont (None , 40 )
33
33
34
+ @unittest .skipIf ("Windows" not in platform .platform (), "Just for windows" )
35
+ def test_sysfont_settings (self ):
36
+ import pygame .font
37
+
38
+ pygame .font .init ()
39
+
40
+ # The idea of this test is that we know we can expect Arial bold, Arial italic
41
+ # Arial, and Arial italic bold to load different fonts on Windows. If that
42
+ # isn't happening it may indicate a problem like
43
+ # https://github.com/pygame-community/pygame-ce/issues/2677
44
+
45
+ arial = pygame .font .SysFont ("Arial" , 40 )
46
+ arial_bold = pygame .font .SysFont ("Arial" , 40 , bold = True )
47
+ arial_italic = pygame .font .SysFont ("Arial" , 40 , italic = True )
48
+ arial_bold_italic = pygame .font .SysFont ("Arial" , 40 , bold = True , italic = True )
49
+
50
+ self .assertNotEqual (arial .style_name , arial_bold .style_name )
51
+ self .assertNotEqual (arial .style_name , arial_italic .style_name )
52
+ self .assertNotEqual (arial .style_name , arial_bold_italic .style_name )
53
+ self .assertNotEqual (arial_bold .style_name , arial_italic .style_name )
54
+ self .assertNotEqual (arial_italic .style_name , arial_bold_italic .style_name )
55
+ self .assertNotEqual (arial_bold .style_name , arial_bold_italic .style_name )
56
+
34
57
@unittest .skipIf (
35
58
("Darwin" in platform .platform () or "Windows" in platform .platform ()),
36
59
"Not unix we skip." ,
0 commit comments