bevy/crates/bevy_text
UkoeHB 21da0b72ae
Zero fontsize panic workaround (#15371)
# Objective

- Fix https://github.com/bevyengine/bevy/issues/15366. `cosmic-text`
buffers refuse to function if the `Metrics` font size is zero.

## Solution

- Trick `cosmic-text` into clearing its internal buffer when the largest
font size of segments is zero by sending it no spans and a tiny
`Metrics::font_size` and `Metrics::line_height`.

## Testing

- [x] Fixes @brandon-reinhart 's bug.
2024-09-23 17:31:50 +00:00
..
src Zero fontsize panic workaround (#15371) 2024-09-23 17:31:50 +00:00
Cargo.toml Use cosmic-text shaping buffer (#14991) 2024-09-02 17:01:46 +00:00
README.md Add README.md to all crates (#13184) 2024-05-02 18:56:00 +00:00

Bevy Text

License Crates.io Downloads Docs Discord