Improve text rendering - #9909
Open
akx wants to merge 17 commits into
Open
Conversation
Avoids a segfault when `encoding` and `font_bytes` weren't passed at all (they were left uninitialized)
akx
force-pushed
the
ft-next
branch
3 times, most recently
from
August 27, 2026 06:37
14524dc to
c2981e6
Compare
(and make `assert_image_equal` raise an AssertionError, not a pytest.fail.Exception)
Sign-extending e.g. 0x80 (char) to 0xffffff80 (FT_ULong) is not what we want when looking up a glyph.
akx
marked this pull request as ready for review
August 27, 2026 08:42
This was referenced Aug 27, 2026
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.
Note
Stacked on #9908 (I guess GitHub's merge stacks don't work cross-fork, ah well).
That PR ought to be reviewed and merged first and I'll happily rebase this.
24a6fa0 is the first new commit here.
Refs #9898 (not "fixes", since I can't be sure this ends up fixing OP's issues).
What's moving?
Some infrastructure:
PILLOW_TEST_SNAPSHOTScan now be set tocreate,overwriteorupdate, soassert_image_similar_tofileandassert_image_equal_tofilecan update the golden image to what was passed in; this is similar to--snapshot-updatefor Syrupy orINSTA_UPDATEfor Rust's Insta.These are the actual fixes; see #9908 for notes on the clean-ups:
(unsigned char)cast.