@@ -742,45 +742,6 @@ def test_outline_property_stub(self):
742742 with self .assertRaises (pygame .error ):
743743 _ = f .outline
744744
745- @unittest .skipIf (
746- pygame .font .get_sdl_ttf_version () < (2 , 0 , 12 ),
747- "outlines were added in SDL_TTF 2.0.12" ,
748- )
749- def test_outline_method (self ):
750- if pygame_font .__name__ == "pygame.ftfont" :
751- return # not a pygame.ftfont feature
752-
753- pygame_font .init ()
754- font_path = os .path .join (
755- os .path .split (pygame .__file__ )[0 ], pygame_font .get_default_font ()
756- )
757- f = pygame_font .Font (pathlib .Path (font_path ), 25 )
758-
759- val0 = f .get_outline ()
760- self .assertIsInstance (val0 , int )
761- self .assertGreaterEqual (val0 , 0 )
762-
763- f .set_outline (5 )
764- self .assertEqual (5 , f .get_outline ())
765- self .assertRaises (ValueError , f .set_outline , - 1 )
766- self .assertRaises (TypeError , f .set_outline , "2" )
767-
768- @unittest .skipIf (
769- pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ),
770- "outlines were added in SDL_TTF 2.0.12" ,
771- )
772- def test_outline_method_stub (self ):
773- if pygame_font .__name__ == "pygame.ftfont" :
774- return # not a pygame.ftfont feature
775-
776- pygame_font .init ()
777- font_path = os .path .join (
778- os .path .split (pygame .__file__ )[0 ], pygame_font .get_default_font ()
779- )
780- f = pygame_font .Font (pathlib .Path (font_path ), 25 )
781-
782- self .assertRaises (pygame .error , f .get_outline )
783- self .assertRaises (pygame .error , f .set_outline , 1 )
784745
785746 def test_font_name (self ):
786747 f = pygame_font .Font (None , 20 )
@@ -1031,13 +992,6 @@ def test_font_method_should_raise_exception_after_quit(self):
1031992 skip_methods = set ()
1032993 version = pygame .font .get_sdl_ttf_version ()
1033994
1034- if version >= (2 , 0 , 12 ):
1035- methods .append (("get_outline" , ()))
1036- methods .append (("set_outline" , (2 ,)))
1037- else :
1038- skip_methods .add ("get_outline" )
1039- skip_methods .add ("set_outline" )
1040-
1041995 if version >= (2 , 0 , 18 ):
1042996 methods .append (("get_point_size" , ()))
1043997 methods .append (("set_point_size" , (34 ,)))
@@ -1239,7 +1193,7 @@ def query(
12391193 f .set_underline (underline )
12401194 f .set_strikethrough (strikethrough )
12411195 if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1242- f .set_outline ( outline )
1196+ f .outline = outline
12431197 s = f .render (text , antialiase , (0 , 0 , 0 ))
12441198 screen .blit (s , (offset , y ))
12451199 y += s .get_size ()[1 ] + spacing
@@ -1248,7 +1202,7 @@ def query(
12481202 f .set_underline (False )
12491203 f .set_strikethrough (False )
12501204 if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1251- f .set_outline ( 0 )
1205+ f .outline = 0
12521206 s = f .render ("(some comparison text)" , False , (0 , 0 , 0 ))
12531207 screen .blit (s , (offset , y ))
12541208 pygame .display .flip ()
0 commit comments