Deprecate various vector-backend-specific mathtext helpers.#18002
Merged
jkseppan merged 1 commit intomatplotlib:masterfrom Aug 2, 2020
Merged
Deprecate various vector-backend-specific mathtext helpers.#18002jkseppan merged 1 commit intomatplotlib:masterfrom
jkseppan merged 1 commit intomatplotlib:masterfrom
Conversation
46d9fd6 to
ea114bb
Compare
QuLogic
reviewed
Jul 24, 2020
| 0.001 * fontsize, 0, | ||
| 0, 0.001 * fontsize, | ||
| ox, oy, Op.concat_matrix) | ||
| symbol_name = font.get_glyph_name(font.get_char_index(num)) |
Member
There was a problem hiding this comment.
There are some fallbacks; do we need to worry about those here:
matplotlib/lib/matplotlib/mathtext.py
Lines 690 to 697 in 03aebfb
Contributor
Author
There was a problem hiding this comment.
No, because _stix_fallback._get_glyph(...) will return a different font object (for which the glyph exists). This can be checked e.g. with
rcParams["mathtext.fontset"] = "cm"; figtext(.5, .5, "$\\perp$"); savefig("/tmp/out.pdf")adding a print to check that fallback occurs. (Actually it looks like this should not fallback as there's a \perp sign in cmsy10.ttf? but that's a separate issue.)
A single mathtext "backend" yielding a list of glyphs and rectangles is enough; renderer-specific logic can be implemented in the renderer themselves. (MathtextBackendAgg needs to stay separate because it uses a different font hinting flag.)
QuLogic
approved these changes
Jul 30, 2020
jkseppan
approved these changes
Aug 2, 2020
4 tasks
7 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A single mathtext "backend" yielding a list of glyphs and rectangles is
enough; renderer-specific logic can be implemented in the renderer
themselves.
(MathtextBackendAgg needs to stay separate because it uses a different
font hinting flag.)
PR Summary
PR Checklist