Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix size of clipped text glyphs. #8197

Merged
merged 2 commits into from
Apr 5, 2023

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Mar 24, 2023

Objective

Text glyphs that were clipped were not sized correctly because the transform extracted by extract_text_uinodes had a scaling on it that wasn't accounted for.

fixes #8167

Solution

Remove the scaling from the transform and multiply the size of the glyphs by the inverse of the scale factor.

…ansform

extracted from the `extract_text_nodes` had a scaling on it that wasn't accounted for.
Fixed this by removing the scaling from the transform and multiplying the size of the
glyph's by the scale factor.
@james7132 james7132 added C-Bug An unexpected or incorrect behavior A-UI Graphical user interfaces, styles, layouts, and widgets A-Rendering Drawing game state to the screen labels Mar 24, 2023
@doup
Copy link
Contributor

doup commented Mar 24, 2023

Tested with new example from #8198, moving text clip (bottom-left) is working fine with this PR. 👌
(scale/rotation are out of scope)

8197-fixed.mp4

@cart cart added this pull request to the merge queue Apr 5, 2023
Merged via the queue into bevyengine:main with commit 1a7f046 Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI node gets compressed in ui example scrollable area boundary
4 participants