@@ -953,6 +953,7 @@ def test_font_property_should_raise_exception_after_quit(self):
953
953
("fixed_width" , None ),
954
954
("fixed_sizes" , None ),
955
955
("antialiased" , 45 ),
956
+ ("outline" , 10 ),
956
957
("kerning" , 46 ),
957
958
("vertical" , 47 ),
958
959
("pad" , 48 ),
@@ -1057,6 +1058,7 @@ def query(
1057
1058
underline = False ,
1058
1059
strikethrough = False ,
1059
1060
antialiase = False ,
1061
+ outline = False ,
1060
1062
):
1061
1063
if self .aborted :
1062
1064
return False
@@ -1067,7 +1069,7 @@ def query(
1067
1069
screen = self .screen
1068
1070
screen .fill ((255 , 255 , 255 ))
1069
1071
pygame .display .flip ()
1070
- if not (bold or italic or underline or strikethrough or antialiase ):
1072
+ if not (bold or italic or underline or strikethrough or antialiase or outline ):
1071
1073
text = "normal"
1072
1074
else :
1073
1075
modes = []
@@ -1081,11 +1083,14 @@ def query(
1081
1083
modes .append ("strikethrough" )
1082
1084
if antialiase :
1083
1085
modes .append ("antialiased" )
1086
+ if outline :
1087
+ modes .append ("outline" )
1084
1088
text = f"{ '-' .join (modes )} (y/n):"
1085
1089
f .set_bold (bold )
1086
1090
f .set_italic (italic )
1087
1091
f .set_underline (underline )
1088
1092
f .set_strikethrough (strikethrough )
1093
+ f .outline = outline
1089
1094
s = f .render (text , antialiase , (0 , 0 , 0 ))
1090
1095
screen .blit (s , (offset , y ))
1091
1096
y += s .get_size ()[1 ] + spacing
@@ -1125,6 +1130,9 @@ def test_strikethrough(self):
1125
1130
def test_antialiase (self ):
1126
1131
self .assertTrue (self .query (antialiase = True ))
1127
1132
1133
+ def test_outline (self ):
1134
+ self .assertTrue (self .query (outline = True ))
1135
+
1128
1136
def test_bold_antialiase (self ):
1129
1137
self .assertTrue (self .query (bold = True , antialiase = True ))
1130
1138
0 commit comments