-
- Notifications
You must be signed in to change notification settings - Fork 4.3k
Object-centered text layout #19559
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
base: main
Are you sure you want to change the base?
Object-centered text layout #19559
Conversation
| @ickshonpe can you merge main and resolve the conflicts? |
| @ickshonpe IIRC you were on the fence about whether we should do this? Should we close this PR? |
…honpe/bevy into object-centered-text-layout
a3892d1 to 396bf6f Compare | 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! 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. |
| 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. |
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.