File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424import warnings
2525import re
2626
27+ from matplotlib import cbook
2728from matplotlib .cbook import mplDeprecation , deprecated , ls_mapper
2829from matplotlib .fontconfig_pattern import parse_fontconfig_pattern
2930from matplotlib .colors import is_color_like
@@ -563,8 +564,15 @@ def validate_negative_linestyle_legacy(s):
563564 'center' ], ignorecase = True )
564565
565566
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'" )
568576
569577
570578def validate_hinting (s ):
You can’t perform that action at this time.
0 commit comments