From d88be59f92ea586af2a75193e7ba82ac4272804b Mon Sep 17 00:00:00 2001 From: "Sebastian J. Hamel" Date: Mon, 22 Jul 2024 15:09:39 -0400 Subject: [PATCH] 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](https://github.com/linebender/bevy_vello/pull/66) ## Solution - Uses `include_bytes` macro and make it `pub` --------- Co-authored-by: Spencer C. Imbleau Co-authored-by: BD103 <59022059+BD103@users.noreply.github.com> --- 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 d5c4527e0b..73117d8084 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_DATA: &[u8] = include_bytes!("FiraMono-subset.ttf"); + /// Adds text rendering support to an app. /// /// When the `bevy_text` feature is enabled with the `bevy` crate, this