Skip to content

Conversation

@ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Jun 9, 2025

Objective

In the text layout the glyph sprites are objected-centered but their positions are relative to the top-left corner of the text layout.
For the sake of consistancy, use object-centered coordinates for the positions as well.

Solution

Use object-centered coordinates for the glyph positions in TextLayoutInfo.

Testing

You can test the changes using the text examples: text2d, text, text_debug, text_wrap_debug.
There should be no differences to main.

@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide A-Text Rendering and layout for characters S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 9, 2025
@ickshonpe ickshonpe added the D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes label Jun 12, 2025
@andriyDev andriyDev added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Jul 5, 2025
@andriyDev
Copy link
Contributor

@ickshonpe can you merge main and resolve the conflicts?

@andriyDev andriyDev 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-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jul 7, 2025
@alice-i-cecile alice-i-cecile added this to the 0.17 milestone Jul 14, 2025
@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jul 14, 2025
@alice-i-cecile
Copy link
Member

@ickshonpe IIRC you were on the fence about whether we should do this? Should we close this PR?

@alice-i-cecile alice-i-cecile added S-Nominated-To-Close A triage team member thinks this PR or issue should be closed out. and removed S-Needs-Design This issue requires design work to think about how it would best be accomplished labels Jul 21, 2025
@alice-i-cecile alice-i-cecile removed this from the 0.17 milestone Jul 21, 2025
@ickshonpe ickshonpe force-pushed the object-centered-text-layout branch from a3892d1 to 396bf6f Compare July 21, 2025 19:15
@github-actions
Copy link
Contributor

Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke!
You can review it at https://pixel-eagle.com/project/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D?filter=PR-19559

If it's expected, please add the M-Deliberate-Rendering-Change label.

If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it.

@alice-i-cecile alice-i-cecile removed the S-Nominated-To-Close A triage team member thinks this PR or issue should be closed out. label Jul 21, 2025
@alice-i-cecile alice-i-cecile added the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Jul 21, 2025
@alice-i-cecile alice-i-cecile added this to the 0.17 milestone Jul 21, 2025
@ickshonpe ickshonpe modified the milestones: 0.17, 0.18 Jul 22, 2025
@ickshonpe
Copy link
Contributor Author

Think this is an improvement but it's not that important and for some reason I can't quite get the text2d migration right 😓. Might as well punt it to 0.18 and fix it later I think.

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-Usability A targeted quality-of-life change that makes Bevy easier to use D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

4 participants