Embed and use Fira Sans as default font when testing

This commit is contained in:
Héctor Ramón Jiménez 2024-12-12 03:14:40 +01:00
parent 7683bd201f
commit 6572909ab5
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
9 changed files with 12 additions and 12 deletions

View file

@ -149,8 +149,8 @@ impl Text {
/// It is loaded as part of the default fonts in Wasm builds.
///
/// [Fira Sans]: https://mozilla.github.io/Fira/
#[cfg(all(target_arch = "wasm32", feature = "fira-sans"))]
pub const FIRA_SANS_REGULAR: &'static [u8] =
#[cfg(feature = "fira-sans")]
pub const FIRA_SANS_REGULAR: &[u8] =
include_bytes!("../fonts/FiraSans-Regular.ttf").as_slice();
/// Returns the global [`FontSystem`].
@ -163,7 +163,7 @@ pub fn font_system() -> &'static RwLock<FontSystem> {
cosmic_text::fontdb::Source::Binary(Arc::new(
include_bytes!("../fonts/Iced-Icons.ttf").as_slice(),
)),
#[cfg(all(target_arch = "wasm32", feature = "fira-sans"))]
#[cfg(feature = "fira-sans")]
cosmic_text::fontdb::Source::Binary(Arc::new(
include_bytes!("../fonts/FiraSans-Regular.ttf").as_slice(),
)),