Skip to content

Commit

Permalink
feat: expose the default font bytes (#14406)
Browse files Browse the repository at this point in the history
# 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]>
  • Loading branch information
3 people authored Jul 22, 2024
1 parent d1f4262 commit d88be59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_text/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d88be59

Please sign in to comment.