Repository navigation
Link create_text_sprite's two-pass workaround to pyglet issue #1509 - #2929
Merged
Merged
Conversation
pyglet's text groups blend alpha like color, which is why create_text_sprite draws the text over black and over white. Link the pyglet issue and note what can change once it's fixed, like the italic workaround's link to #1508. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
A comment-only change.
create_text_spritedraws its text twice, over black and over white (#2923), to work around pyglet blending text's alpha like its color. I've reported that upstream as pyglet/pyglet#1509.The comment now links that issue, and notes that once pyglet blends alpha separately, one pass over transparent black would do, with the alpha divided out. That makes the workaround easy to find and remove later, like the italic workaround's link to pyglet/pyglet#1508.
Text sprite tests pass, and ruff is clean. No changelog entry, since nothing changes for users.
🤖 Generated with Claude Code