Skip to content
Discussion options

You must be logged in to vote

Bevy itself is embedding a tiny stripped-down font in the binary, bypassing the asset server. But the example you linked is making the assumption that you want to load a normal font the normal way through the asset server and not bloat up your binary. In that case, you need to poll until the font is actually loaded (an asynchronous process that may take more than one frame) before you can replace it.

If you're okay with embedding the font, I think you can simplify like this:

use bevy::{asset::load_internal_binary_asset, prelude::*};

fn main() {
    let mut app = App::new();

    app.add_plugins(DefaultPlugins).add_systems(Startup, setup);

    // This needs to happen after `DefaultPlugin…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@onkoe
Comment options

@rparrett
Comment options

Answer selected by onkoe
@rlidwka
Comment options

@onkoe
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants