Support using the current font for 'custom' mathtext styles #323
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #318. Now
mathtext.default
is set to'it'
and I've changed themathtext.it
,mathtext.bf
,mathtext.rm
, andmathtext.sf
from'sans'
to'regular'
.Note the
'regular'
string is a stand-in that tells matplotlib to use the current font. For example,'regular:italic'
applies italics to the current font. This is an improvement on previous behavior, in which only the unmodified (non-bold, non-italic) global font could be used for custom math text.I've also added the Fira Sans, Noto Serif, and Source Serif Pro fonts. Previously I thought Fira Sans was redundant, but this is not the case, because Fira Math is not available in italics. Also, the Noto and Source serif fonts are nice companions for their sans-serif counterparts already included in proplot.
Here is the result of the demo function on reeadthedocs (note the italicezed math text):