bevy/crates/bevy_text/src
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
..
bounds.rs Reflect derived traits on all components and resources: bevy_text (#15229) 2024-09-15 17:21:02 +00:00
error.rs Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
FiraMono-subset.ttf add a default font (#8445) 2023-04-21 22:30:18 +00:00
font_atlas_set.rs Add the ability to control font smoothing (#15368) 2024-09-23 17:28:25 +00:00
font_atlas.rs Add the ability to control font smoothing (#15368) 2024-09-23 17:28:25 +00:00
font_loader.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
font.rs Cosmic text (#10193) 2024-07-04 20:41:08 +00:00
glyph.rs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
lib.rs Trim cosmic-text's shape run cache (#15037) 2024-09-10 23:28:05 +00:00
pipeline.rs Zero fontsize panic workaround (#15371) 2024-09-23 17:31:50 +00:00
text2d.rs Add the ability to control font smoothing (#15368) 2024-09-23 17:28:25 +00:00
text.rs Add the ability to control font smoothing (#15368) 2024-09-23 17:28:25 +00:00