@@ -685,10 +685,6 @@ def test_point_size_method(self):
685685 self .assertRaises (ValueError , f .set_point_size , - 500 )
686686 self .assertRaises (TypeError , f .set_point_size , "15" )
687687
688- @unittest .skipIf (
689- pygame .font .get_sdl_ttf_version () < (2 , 0 , 12 ),
690- "outlines were added in SDL_TTF 2.0.12" ,
691- )
692688 def test_outline_property (self ):
693689 if pygame_font .__name__ == "pygame.ftfont" :
694690 return # not a pygame.ftfont feature
@@ -720,25 +716,6 @@ def test_incorrect_type():
720716 self .assertRaises (ValueError , test_neg )
721717 self .assertRaises (TypeError , test_incorrect_type )
722718
723- @unittest .skipIf (
724- pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ),
725- "outlines were added in SDL_TTF 2.0.12" ,
726- )
727- def test_outline_property_stub (self ):
728- if pygame_font .__name__ == "pygame.ftfont" :
729- return # not a pygame.ftfont feature
730-
731- pygame_font .init ()
732- font_path = os .path .join (
733- os .path .split (pygame .__file__ )[0 ], pygame_font .get_default_font ()
734- )
735- f = pygame_font .Font (pathlib .Path (font_path ), 25 )
736-
737- with self .assertRaises (pygame .error ):
738- f .outline = 0
739- with self .assertRaises (pygame .error ):
740- _ = f .outline
741-
742719 def test_font_name (self ):
743720 f = pygame_font .Font (None , 20 )
744721 self .assertEqual (f .name , "FreeSans" )
@@ -1075,6 +1052,7 @@ def test_font_property_should_raise_exception_after_quit(self):
10751052 ("italic" , True ),
10761053 ("underline" , True ),
10771054 ("strikethrough" , True ),
1055+ ("outline" , 1 ),
10781056 ]
10791057 skip_properties = set ()
10801058 version = pygame .font .get_sdl_ttf_version ()
@@ -1087,11 +1065,6 @@ def test_font_property_should_raise_exception_after_quit(self):
10871065 else :
10881066 skip_properties .add ("point_size" )
10891067
1090- if version >= (2 , 0 , 12 ):
1091- properties .append (("outline" , 1 ))
1092- else :
1093- skip_properties .add ("outline" )
1094-
10951068 font = pygame_font .Font (None , 10 )
10961069 actual_names = []
10971070
@@ -1188,17 +1161,15 @@ def query(
11881161 f .set_italic (italic )
11891162 f .set_underline (underline )
11901163 f .set_strikethrough (strikethrough )
1191- if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1192- f .outline = outline
1164+ f .outline = outline
11931165 s = f .render (text , antialiase , (0 , 0 , 0 ))
11941166 screen .blit (s , (offset , y ))
11951167 y += s .get_size ()[1 ] + spacing
11961168 f .set_bold (False )
11971169 f .set_italic (False )
11981170 f .set_underline (False )
11991171 f .set_strikethrough (False )
1200- if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1201- f .outline = 0
1172+ f .outline = 0
12021173 s = f .render ("(some comparison text)" , False , (0 , 0 , 0 ))
12031174 screen .blit (s , (offset , y ))
12041175 pygame .display .flip ()
@@ -1240,10 +1211,6 @@ def test_italic_underline(self):
12401211 def test_bold_strikethrough (self ):
12411212 self .assertTrue (self .query (bold = True , strikethrough = True ))
12421213
1243- @unittest .skipIf (
1244- pygame .font .get_sdl_ttf_version () < (2 , 0 , 12 ),
1245- "outlines were added in SDL_TTF 2.0.12" ,
1246- )
12471214 def test_outline (self ):
12481215 self .assertTrue (self .query (outline = 1 ))
12491216
0 commit comments