Closed
Description
Bevy version
0.15.0-rc.3
, also current main
Relevant system information
SystemInfo { os: "MacOS 14.5 ", kernel: "23.5.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" }
AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
What you did
- Disable
default-features
- Decline to enable
default_font
feature - Use nested text spans where the (empty) root node uses
TextFont::default()
either by omission of the component, or by explicitly setting it to that value.
https://github.com/rparrett/bevy-default-font-bug
git clone https://github.com/rparrett/bevy-default-font-bug
cd bevy-default-font-bug
cargo run
What went wrong
No text is displayed
Additional Information
Relevant snippet pasted here for convenience
let font = asset_server.load("FiraSans-Bold.ttf");
commands
.spawn((
Text::default(),
// Uncommenting this makes things work
// TextFont {
// font: font.clone(),
// ..default()
// },
))
.with_children(|parent| {
parent.spawn((
TextSpan::new("span, should be visible"),
TextFont { font, ..default() },
));
});