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
@@ -570,8 +571,15 @@ def validate_corner_mask(s):
570571 'center' ], ignorecase = True )
571572
572573
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'" )
575583
576584
577585def validate_hinting (s ):
You can’t perform that action at this time.
0 commit comments