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
@@ -570,8 +571,15 @@ def validate_corner_mask(s):
570
571
'center' ], ignorecase = True )
571
572
572
573
573
- validate_svg_fonttype = ValidateInStrings ('svg.fonttype' ,
574
- ['none' , 'path' , 'svgfont' ])
574
+ def validate_svg_fonttype (s ):
575
+ if s in ["none" , "path" ]:
576
+ return s
577
+ if s == "svgfont" :
578
+ cbook .warn_deprecated (
579
+ "2.2" , "'svgfont' support for svg.fonttype is deprecated." )
580
+ return s
581
+ raise ValueError ("Unrecognized svg.fonttype string '{}'; "
582
+ "valid strings are 'none', 'path'" )
575
583
576
584
577
585
def validate_hinting (s ):
You can’t perform that action at this time.
0 commit comments