You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Objective
Add minimal strikethrough support for text.
## Solution
* Insert the new `Strikethrough` component on any `Text`, `Text2d`, or
`TextSpan` entity and its text will be drawn with strikethrough.
* The strikethrough geometry is stored in `TextLayoutInfo` in the vec
with the section bounding rects.
* Rendering is trivial, identical to drawing text background colours
except it's a narrower rect drawn in front instead of behind.
* Text shadows also have strikethrough if the text does.
#
This implementation can easily be expanded to support underline, I've
already made a follow up PR that does this here: #21559.
## Testing
```
cargo run --example strikethrough
```
## Showcase
<img width="1422" height="924" alt="strikeout"
src="https://github.com/user-attachments/assets/c8ea2578-e40c-4c46-ae0d-df9e3f261f3a"
/>
0 commit comments