Text with an invalid span is silently not rendered #18205
Labels
A-Text
Rendering and layout for characters
C-Bug
An unexpected or incorrect behavior
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
Bevy version
main
(0.16.0-dev)What you did
What went wrong
When one of
font_a
orfont_b
is not a valid handle to a font (e.g. if the asset is still loading, or ifHandle::default()
is used while bevy's default font feature is disabled), the entire text will be invisible with no warning emitted. It can be difficult to trace down why the text isn't rendering, because it looks like the issue is "higher up" than it actually is, and you'd need good tooling for inspecting entities and font handles.Suggestions:
Personal preference towards 2 or 4, but 1 is good enough.
Additional information
A similar issue can happen when setting a font size of
f32::NAN
, but the effects of doing so are inconsistent.The text was updated successfully, but these errors were encountered: