From 57c2ea7b623d77cbdfa9ea28646b3b77e2ab4e8f Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Fri, 1 Sep 2023 07:16:13 +0200 Subject: [PATCH] feat(font): add FONT_MONO_REGULAR from Fira Mono --- src/font.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/font.rs b/src/font.rs index 5484e1f5..052d4642 100644 --- a/src/font.rs +++ b/src/font.rs @@ -10,6 +10,8 @@ use iced::{ }; use iced_core::font::Family; +pub const DEFAULT: Font = FONT; + pub const FONT: Font = Font { family: Family::Name("Fira Sans"), weight: iced_core::font::Weight::Normal, @@ -37,10 +39,20 @@ pub const FONT_SEMIBOLD: Font = Font { pub const FONT_SEMIBOLD_DATA: &[u8] = include_bytes!("../res/Fira/FiraSans-SemiBold.otf"); +pub const FONT_MONO_REGULAR: Font = Font { + family: Family::Name("Fira Mono"), + weight: iced_core::font::Weight::Normal, + stretch: iced_core::font::Stretch::Normal, + monospaced: true, +}; + +pub const FONT_MONO_REGULAR_DATA: &[u8] = include_bytes!("../res/Fira/FiraMono-Regular.otf"); + pub fn load_fonts() -> Command> { Command::batch(vec![ load(FONT_DATA), load(FONT_LIGHT_DATA), load(FONT_SEMIBOLD_DATA), + load(FONT_MONO_REGULAR_DATA), ]) }