FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Resolve mathtext.fontset at FontProperties creation time. by anntzer · Pull Request #18862 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
15 changes: 6 additions & 9 deletions lib/matplotlib/font_manager.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,6 @@ def get_math_fontfamily(self):

The default font is :rc:`mathtext.fontset`.
"""
if self._math_fontfamily is None:
return rcParams['mathtext.fontset']
return self._math_fontfamily

def set_math_fontfamily(self, fontfamily):
Expand All @@ -921,13 +919,12 @@ def set_math_fontfamily(self, fontfamily):
.text.Text.get_math_fontfamily
"""
if fontfamily is None:
self._math_fontfamily = None
return

valid_fonts = _validators['mathtext.fontset'].valid.values()
# _check_in_list() Validates the parameter math_fontfamily as
# if it were passed to rcParams['mathtext.fontset']
_api.check_in_list(valid_fonts, math_fontfamily=fontfamily)
fontfamily = rcParams['mathtext.fontset']
else:
valid_fonts = _validators['mathtext.fontset'].valid.values()
# _check_in_list() Validates the parameter math_fontfamily as
# if it were passed to rcParams['mathtext.fontset']
_api.check_in_list(valid_fonts, math_fontfamily=fontfamily)
self._math_fontfamily = fontfamily

def copy(self):
Expand Down

Back | FazBrowse Home | New Git URL