fix: incorrect font weights, sizes, line heights

This commit is contained in:
Michael Aaron Murphy 2023-05-30 23:46:49 +02:00 committed by Michael Murphy
parent f06a81ccf9
commit 31f7e97d5b
8 changed files with 37 additions and 21 deletions

View file

@ -6,14 +6,33 @@ use iced::{
font::{load, Error},
Command,
};
use iced_core::font::Family;
pub const FONT: Font = Font {
family: Family::Name("Fira Sans"),
weight: iced_core::font::Weight::Normal,
stretch: iced_core::font::Stretch::Normal,
monospaced: false,
};
pub const FONT: Font = Font::with_name("Fira Sans Regular");
pub const FONT_DATA: &[u8] = include_bytes!("../res/Fira/FiraSans-Regular.otf");
pub const FONT_LIGHT: Font = Font::with_name("Fira Sans Light");
pub const FONT_LIGHT: Font = Font {
family: Family::Name("Fira Sans"),
weight: iced_core::font::Weight::Light,
stretch: iced_core::font::Stretch::Normal,
monospaced: false,
};
pub const FONT_LIGHT_DATA: &[u8] = include_bytes!("../res/Fira/FiraSans-Light.otf");
pub const FONT_SEMIBOLD: Font = Font::with_name("Fira Sans SemiBold");
pub const FONT_SEMIBOLD: Font = Font {
family: Family::Name("Fira Sans"),
weight: iced_core::font::Weight::Semibold,
stretch: iced_core::font::Stretch::Normal,
monospaced: false,
};
pub const FONT_SEMIBOLD_DATA: &[u8] = include_bytes!("../res/Fira/FiraSans-SemiBold.otf");
pub fn load_fonts() -> Command<Result<(), Error>> {