Skip to content

Commit d88be59

Browse files
seabassjhnuzzlesBD103
authored
feat: expose the default font bytes (#14406)
# Objective - Enables use cases where third-party crates would want to use the default font as well [see linebender's use](linebender/bevy_vello#66) ## Solution - Uses `include_bytes` macro and make it `pub` --------- Co-authored-by: Spencer C. Imbleau <[email protected]> Co-authored-by: BD103 <[email protected]>
1 parent d1f4262 commit d88be59

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_text/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ use bevy_render::{
7171
};
7272
use bevy_sprite::SpriteSystem;
7373

74+
/// The raw data for the default font used by `bevy_text`
75+
#[cfg(feature = "default_font")]
76+
pub const DEFAULT_FONT_DATA: &[u8] = include_bytes!("FiraMono-subset.ttf");
77+
7478
/// Adds text rendering support to an app.
7579
///
7680
/// When the `bevy_text` feature is enabled with the `bevy` crate, this

0 commit comments

Comments
 (0)