RunGeometry#21656
Conversation
… store each run's bounds and decoration geometry. Renamed `TextLayoutInfo::section_geometry` to `TextLayoutInfo::run_geometry`.
alice-i-cecile
left a comment
There was a problem hiding this comment.
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 🤔
DaAlbrecht
left a comment
There was a problem hiding this comment.
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.