From 61c64a7a153218e829d3ccf23257d1a71cae3dcc Mon Sep 17 00:00:00 2001 From: Sebastian Hamel Date: Sat, 20 Jul 2024 14:36:20 -0400 Subject: [PATCH 1/3] feat: expose the default font bytes Co-authored-by: Spencer C. Imbleau --- crates/bevy_text/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index d5c4527e0b11d..baf105d388354 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -71,6 +71,10 @@ use bevy_render::{ }; use bevy_sprite::SpriteSystem; +/// The raw data for the default font used by `bevy_text` +#[cfg(feature = "default_font")] +pub const DEFAULT_FONT: &[u8; 18848] = include_bytes!("FiraMono-subset.ttf"); + /// Adds text rendering support to an app. /// /// When the `bevy_text` feature is enabled with the `bevy` crate, this From 43bc3123907b8e7cb8268789f6c2034042325f83 Mon Sep 17 00:00:00 2001 From: "Sebastian J. Hamel" Date: Sat, 20 Jul 2024 14:46:27 -0400 Subject: [PATCH 2/3] Update crates/bevy_text/src/lib.rs Co-authored-by: Spencer C. Imbleau --- crates/bevy_text/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index baf105d388354..7b659d467d399 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -73,7 +73,7 @@ use bevy_sprite::SpriteSystem; /// The raw data for the default font used by `bevy_text` #[cfg(feature = "default_font")] -pub const DEFAULT_FONT: &[u8; 18848] = include_bytes!("FiraMono-subset.ttf"); +pub const DEFAULT_FONT_DATA: &[u8; 18848] = include_bytes!("FiraMono-subset.ttf"); /// Adds text rendering support to an app. /// From a395b7a0218949f81460d0a9f2d39eb0ad8af1c6 Mon Sep 17 00:00:00 2001 From: "Sebastian J. Hamel" Date: Mon, 22 Jul 2024 09:46:27 -0400 Subject: [PATCH 3/3] Update crates/bevy_text/src/lib.rs Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com> --- crates/bevy_text/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_text/src/lib.rs b/crates/bevy_text/src/lib.rs index 7b659d467d399..73117d80841ca 100644 --- a/crates/bevy_text/src/lib.rs +++ b/crates/bevy_text/src/lib.rs @@ -73,7 +73,7 @@ use bevy_sprite::SpriteSystem; /// The raw data for the default font used by `bevy_text` #[cfg(feature = "default_font")] -pub const DEFAULT_FONT_DATA: &[u8; 18848] = include_bytes!("FiraMono-subset.ttf"); +pub const DEFAULT_FONT_DATA: &[u8] = include_bytes!("FiraMono-subset.ttf"); /// Adds text rendering support to an app. ///