@@ -688,10 +688,6 @@ def test_point_size_method(self):
688688 self .assertRaises (ValueError , f .set_point_size , - 500 )
689689 self .assertRaises (TypeError , f .set_point_size , "15" )
690690
691- @unittest .skipIf (
692- pygame .font .get_sdl_ttf_version () < (2 , 0 , 12 ),
693- "outlines were added in SDL_TTF 2.0.12" ,
694- )
695691 def test_outline_property (self ):
696692 if pygame_font .__name__ == "pygame.ftfont" :
697693 return # not a pygame.ftfont feature
@@ -723,25 +719,6 @@ def test_incorrect_type():
723719 self .assertRaises (ValueError , test_neg )
724720 self .assertRaises (TypeError , test_incorrect_type )
725721
726- @unittest .skipIf (
727- pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ),
728- "outlines were added in SDL_TTF 2.0.12" ,
729- )
730- def test_outline_property_stub (self ):
731- if pygame_font .__name__ == "pygame.ftfont" :
732- return # not a pygame.ftfont feature
733-
734- pygame_font .init ()
735- font_path = os .path .join (
736- os .path .split (pygame .__file__ )[0 ], pygame_font .get_default_font ()
737- )
738- f = pygame_font .Font (pathlib .Path (font_path ), 25 )
739-
740- with self .assertRaises (pygame .error ):
741- f .outline = 0
742- with self .assertRaises (pygame .error ):
743- _ = f .outline
744-
745722 def test_font_name (self ):
746723 f = pygame_font .Font (None , 20 )
747724 self .assertEqual (f .name , "FreeSans" )
@@ -1078,6 +1055,7 @@ def test_font_property_should_raise_exception_after_quit(self):
10781055 ("italic" , True ),
10791056 ("underline" , True ),
10801057 ("strikethrough" , True ),
1058+ ("outline" , 1 ),
10811059 ]
10821060 skip_properties = set ()
10831061 version = pygame .font .get_sdl_ttf_version ()
@@ -1090,11 +1068,6 @@ def test_font_property_should_raise_exception_after_quit(self):
10901068 else :
10911069 skip_properties .add ("point_size" )
10921070
1093- if version >= (2 , 0 , 12 ):
1094- properties .append (("outline" , 1 ))
1095- else :
1096- skip_properties .add ("outline" )
1097-
10981071 font = pygame_font .Font (None , 10 )
10991072 actual_names = []
11001073
@@ -1191,17 +1164,15 @@ def query(
11911164 f .set_italic (italic )
11921165 f .set_underline (underline )
11931166 f .set_strikethrough (strikethrough )
1194- if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1195- f .outline = outline
1167+ f .outline = outline
11961168 s = f .render (text , antialiase , (0 , 0 , 0 ))
11971169 screen .blit (s , (offset , y ))
11981170 y += s .get_size ()[1 ] + spacing
11991171 f .set_bold (False )
12001172 f .set_italic (False )
12011173 f .set_underline (False )
12021174 f .set_strikethrough (False )
1203- if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1204- f .outline = 0
1175+ f .outline = 0
12051176 s = f .render ("(some comparison text)" , False , (0 , 0 , 0 ))
12061177 screen .blit (s , (offset , y ))
12071178 pygame .display .flip ()
@@ -1243,10 +1214,6 @@ def test_italic_underline(self):
12431214 def test_bold_strikethrough (self ):
12441215 self .assertTrue (self .query (bold = True , strikethrough = True ))
12451216
1246- @unittest .skipIf (
1247- pygame .font .get_sdl_ttf_version () < (2 , 0 , 12 ),
1248- "outlines were added in SDL_TTF 2.0.12" ,
1249- )
12501217 def test_outline (self ):
12511218 self .assertTrue (self .query (outline = 1 ))
12521219
0 commit comments