Skip to content

Text2d size fix#24399

Merged
mockersf merged 1 commit into
bevyengine:mainfrom
ickshonpe:text2d-size-fix
May 23, 2026
Merged

Text2d size fix#24399
mockersf merged 1 commit into
bevyengine:mainfrom
ickshonpe:text2d-size-fix

Conversation

@ickshonpe
Copy link
Copy Markdown
Contributor

@ickshonpe ickshonpe commented May 22, 2026

Objective

Fixes #24384

Solution

The layout size is stored in physical pixels so it needs to be multiplied by the inverse scale factor when calculating anchor offsets.

Testing

cargo run --example text2d

@ickshonpe ickshonpe added C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy A-Rendering Drawing game state to the screen A-Text Rendering and layout for characters S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 22, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering May 22, 2026
@mockersf mockersf added this pull request to the merge queue May 23, 2026
Merged via the queue into bevyengine:main with commit d3dd1f9 May 23, 2026
49 checks passed
@github-project-automation github-project-automation Bot moved this from Needs SME Triage to Done in Rendering May 23, 2026
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-Text Rendering and layout for characters C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

TextLayoutInfo::scale_factor change broke example multi_window_text

2 participants