Skip to content

Conversation

@busitech
Copy link

What does the pull request do?

This pull request fixes clipping of text in TextPresenter and TextBlock.

What is the current behavior?

Text was being clipped by TextPresenter and TextBlock because their measured bounds only considered advance widths, not the actual ink extent of glyphs. This was especially apparent on italic text. After bounds was correct, the right justification calculation had the same issue. Examples of the clipping is illustrated by screenshots in issue #20376

What is the updated/expected behavior with this PR?

The ink should remain within bounds.

How was the solution implemented (if it's not obvious)?

The actual ink extent of glyphs is now used to calculate bounds correctly, and right justification is now adjusted for overhang.

Fixed issues

Fixes #20376

@busitech busitech reopened this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TextPresenter and TextBlock measure incorrectly

1 participant