fix(app): preload embedded Fira fonts
This commit is contained in:
parent
73f0596650
commit
173a9557c2
2 changed files with 26 additions and 8 deletions
12
src/font.rs
12
src/font.rs
|
|
@ -4,11 +4,7 @@
|
|||
//! Select preferred fonts.
|
||||
|
||||
pub use iced::Font;
|
||||
use iced::{
|
||||
font::{load, Error},
|
||||
Command,
|
||||
};
|
||||
use iced_core::font::Family;
|
||||
use iced_core::font::{Family, Weight};
|
||||
|
||||
pub fn default() -> Font {
|
||||
Font::from(crate::config::interface_font())
|
||||
|
|
@ -16,21 +12,21 @@ pub fn default() -> Font {
|
|||
|
||||
pub fn light() -> Font {
|
||||
Font {
|
||||
weight: iced_core::font::Weight::Light,
|
||||
weight: Weight::Light,
|
||||
..default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn semibold() -> Font {
|
||||
Font {
|
||||
weight: iced_core::font::Weight::Semibold,
|
||||
weight: Weight::Semibold,
|
||||
..default()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn bold() -> Font {
|
||||
Font {
|
||||
weight: iced_core::font::Weight::Bold,
|
||||
weight: Weight::Bold,
|
||||
..default()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue