@@ -739,45 +739,6 @@ def test_outline_property_stub(self):
739739 with self .assertRaises (pygame .error ):
740740 _ = f .outline
741741
742- @unittest .skipIf (
743- pygame .font .get_sdl_ttf_version () < (2 , 0 , 12 ),
744- "outlines were added in SDL_TTF 2.0.12" ,
745- )
746- def test_outline_method (self ):
747- if pygame_font .__name__ == "pygame.ftfont" :
748- return # not a pygame.ftfont feature
749-
750- pygame_font .init ()
751- font_path = os .path .join (
752- os .path .split (pygame .__file__ )[0 ], pygame_font .get_default_font ()
753- )
754- f = pygame_font .Font (pathlib .Path (font_path ), 25 )
755-
756- val0 = f .get_outline ()
757- self .assertIsInstance (val0 , int )
758- self .assertGreaterEqual (val0 , 0 )
759-
760- f .set_outline (5 )
761- self .assertEqual (5 , f .get_outline ())
762- self .assertRaises (ValueError , f .set_outline , - 1 )
763- self .assertRaises (TypeError , f .set_outline , "2" )
764-
765- @unittest .skipIf (
766- pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ),
767- "outlines were added in SDL_TTF 2.0.12" ,
768- )
769- def test_outline_method_stub (self ):
770- if pygame_font .__name__ == "pygame.ftfont" :
771- return # not a pygame.ftfont feature
772-
773- pygame_font .init ()
774- font_path = os .path .join (
775- os .path .split (pygame .__file__ )[0 ], pygame_font .get_default_font ()
776- )
777- f = pygame_font .Font (pathlib .Path (font_path ), 25 )
778-
779- self .assertRaises (pygame .error , f .get_outline )
780- self .assertRaises (pygame .error , f .set_outline , 1 )
781742
782743 def test_font_name (self ):
783744 f = pygame_font .Font (None , 20 )
@@ -1028,13 +989,6 @@ def test_font_method_should_raise_exception_after_quit(self):
1028989 skip_methods = set ()
1029990 version = pygame .font .get_sdl_ttf_version ()
1030991
1031- if version >= (2 , 0 , 12 ):
1032- methods .append (("get_outline" , ()))
1033- methods .append (("set_outline" , (2 ,)))
1034- else :
1035- skip_methods .add ("get_outline" )
1036- skip_methods .add ("set_outline" )
1037-
1038992 if version >= (2 , 0 , 18 ):
1039993 methods .append (("get_point_size" , ()))
1040994 methods .append (("set_point_size" , (34 ,)))
@@ -1236,7 +1190,7 @@ def query(
12361190 f .set_underline (underline )
12371191 f .set_strikethrough (strikethrough )
12381192 if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1239- f .set_outline ( outline )
1193+ f .outline = outline
12401194 s = f .render (text , antialiase , (0 , 0 , 0 ))
12411195 screen .blit (s , (offset , y ))
12421196 y += s .get_size ()[1 ] + spacing
@@ -1245,7 +1199,7 @@ def query(
12451199 f .set_underline (False )
12461200 f .set_strikethrough (False )
12471201 if pygame .font .get_sdl_ttf_version () >= (2 , 0 , 12 ):
1248- f .set_outline ( 0 )
1202+ f .outline = 0
12491203 s = f .render ("(some comparison text)" , False , (0 , 0 , 0 ))
12501204 screen .blit (s , (offset , y ))
12511205 pygame .display .flip ()
0 commit comments