[RTL] Fix RichTextLabel vertical alignment calculation regression - #122401
Open
AgZ47 wants to merge 2 commits into
Open
[RTL] Fix RichTextLabel vertical alignment calculation regression#122401AgZ47 wants to merge 2 commits into
AgZ47 wants to merge 2 commits into
Conversation
bruvzg
requested changes
Aug 14, 2026
bruvzg
left a comment
Member
There was a problem hiding this comment.
This will reintroduce a bunch of other issues this code fixed.
Author
|
Would restricting the 0x200B insertion to only when the line has no text glyphs be the right direction to preserve the fallback font fix without inflating populated lines? |
Author
|
I've updated the PR to guard the
|
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.
What problem(s) does this PR solve?
Additional information
Commit facdd8e added a zero-width space (
U+200B) to lines inRichTextLabel::_shape_line()to ensure uniform line height with fallback fonts. However, appendingU+200BcausesTextServerto append an extra glyph run that inflatestext_buf->get_size().yby 3px for standard fonts. This inflated total height causesVERTICAL_ALIGNMENT_BOTTOMto be offset by 3px andVERTICAL_ALIGNMENT_CENTERto be offset by ~1.5px.I have used AI to help me as a first time contributor, helped me with some of the git commands and in finding the right file locations.