File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 24
24
import warnings
25
25
import re
26
26
27
+ from matplotlib import cbook
27
28
from matplotlib .cbook import mplDeprecation , deprecated , ls_mapper
28
29
from matplotlib .fontconfig_pattern import parse_fontconfig_pattern
29
30
from matplotlib .colors import is_color_like
@@ -563,8 +564,15 @@ def validate_negative_linestyle_legacy(s):
563
564
'center' ], ignorecase = True )
564
565
565
566
566
- validate_svg_fonttype = ValidateInStrings ('svg.fonttype' ,
567
- ['none' , 'path' , 'svgfont' ])
567
+ def validate_svg_fonttype (s ):
568
+ if s in ["none" , "path" ]:
569
+ return s
570
+ if s == "svgfont" :
571
+ cbook .warn_deprecated (
572
+ "2.2" , "'svgfont' support for svg.fonttype is deprecated." )
573
+ return s
574
+ raise ValueError ("Unrecognized svg.fonttype string '{}'; "
575
+ "valid strings are 'none', 'path'" )
568
576
569
577
570
578
def validate_hinting (s ):
You can’t perform that action at this time.
0 commit comments