-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
RunGeometry
#21656
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
RunGeometry
#21656
Conversation
… store each run's bounds and decoration geometry. Renamed `TextLayoutInfo::section_geometry` to `TextLayoutInfo::run_geometry`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the change, but do we need a migration guide? I intend to get this shipped for 0.18, and I'm not sure that the field existed back in 0.17 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea the migration guide is not needed imo, this field did not exist: https://docs.rs/bevy/latest/bevy/text/struct.TextLayoutInfo.html
I think we do a migration guide, but it needs a correction as the field was named |
|
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. |
Objective
Follow up to the underline and strikethrough PRs:
TextLayoutInfo::section_geometrywith a struct with named fields.TextLayoutInfo::section_geometrybecause "section" in our terminology implies a one-to-one correspondence with text entities.Solution
RunGeometry.RunGeometryholds the bounds and decoration geometry for each text run (a contiguous sequence of glyphs on a line that share text attributes). It has helper methods for placing underline and strikethrough.section_geometryfield torun_geometryand make it aVec<RunGeometry>RunGeometryhas seperateunderline_thicknessandstrikethrough_thicknessvalues.