Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deprecate support for "svg fonts" font embedding. #10086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions lib/matplotlib/rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import warnings
import re

from matplotlib import cbook
from matplotlib.cbook import mplDeprecation, deprecated, ls_mapper
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
from matplotlib.colors import is_color_like
Expand Down Expand Up @@ -570,8 +571,15 @@ def validate_corner_mask(s):
'center'], ignorecase=True)


validate_svg_fonttype = ValidateInStrings('svg.fonttype',
['none', 'path', 'svgfont'])
def validate_svg_fonttype(s):
if s in ["none", "path"]:
return s
if s == "svgfont":
cbook.warn_deprecated(
"2.2", "'svgfont' support for svg.fonttype is deprecated.")
return s
raise ValueError("Unrecognized svg.fonttype string '{}'; "
"valid strings are 'none', 'path'")


def validate_hinting(s):
Expand Down