Skip to content

Set TextLayoutInfo::scale_factor in update_text_layout_info#24245

Open
ickshonpe wants to merge 1 commit into
bevyengine:mainfrom
ickshonpe:text-layout-info-sf-changes
Open

Set TextLayoutInfo::scale_factor in update_text_layout_info#24245
ickshonpe wants to merge 1 commit into
bevyengine:mainfrom
ickshonpe:text-layout-info-sf-changes

Conversation

@ickshonpe
Copy link
Copy Markdown
Contributor

@ickshonpe ickshonpe commented May 11, 2026

Objective

  • TextLayoutInfo::scale_factor should be set during update_text_layout_info with the value taken from the parley Layout, responsibility should not be with the caller.
  • TextLayoutInfo::size is scaled to be in logical pixels, this isn't consistant with other UI layout values that are kept in physical pixels.

Solution

  • Update TextLayoutInfo::scale_factor in update_text_layout_info with the value taken from the parley Layout.
  • Remove the lines updating scale_factor and scaling size from the text2d and UI text systems.

…ate function with the value taken from the parley `Layout`, not the caller.

* `TextLayoutInfo::size` should be in physical pixels, like the rest of the layout properties, and, again, set b he text layout update function, not the caller.
@ickshonpe ickshonpe added A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change labels May 11, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI May 11, 2026
@ickshonpe ickshonpe added A-Text Rendering and layout for characters S-Needs-Goal This should have a C-Goal and should not continue until it has one D-Trivial Nice and easy! A great choice to get started with Bevy labels May 11, 2026
@kfc35 kfc35 added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Needs-Goal This should have a C-Goal and should not continue until it has one labels May 11, 2026
@Zeophlite Zeophlite added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Text Rendering and layout for characters A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

3 participants