Refactor RendererAgg.draw_{mathtext,text,tex} to use same base algorithm#31085
Merged
QuLogic merged 4 commits intomatplotlib:text-overhaulfrom Feb 6, 2026
Merged
Refactor RendererAgg.draw_{mathtext,text,tex} to use same base algorithm#31085QuLogic merged 4 commits intomatplotlib:text-overhaulfrom
QuLogic merged 4 commits intomatplotlib:text-overhaulfrom
Conversation
5 tasks
Member
Author
|
Note, I have prepared a refactor including #30039 if you want to wait before/after that is merged. |
anntzer
approved these changes
Feb 5, 2026
Contributor
|
Actually, let's get #30039 in first, given that you already did the necessary work to build on top of it; thanks! |
tacaswell
approved these changes
Feb 5, 2026
b29dc90 to
0b7412a
Compare
Member
Author
|
Now rebased to include the changes to |
This makes it more similar to `draw_mathtext`, and is necessary for colour fonts, where the previously-cached bitmap would have been downgraded to black&white strokes by FreeType when copied. It should also reduce the necessary code paths with the other text drawing methods as well.
All the glyph drawing loop is the same, other than a flexible size in the former.
All the glyph drawing loop is the same, other than a slight transform difference with slant/extend in the former.
0b7412a to
754bdab
Compare
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.
PR summary
I pulled this out of #30725 because it was independent of that, and was the cause of the image changes there, so it might be easier to review this as a separate change. The test image changes are rather subtle effects on the edges of rotated text, and probably nothing to worry about.
PR checklist