-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
051957e
commit 1b315b5
Showing
9 changed files
with
1,330 additions
and
289 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,37 @@ | ||
use iced::Font; | ||
use iced::{ | ||
font::{Family, Stretch, Weight}, | ||
Command, Font, | ||
}; | ||
|
||
pub const BOLD: Font = Font::External { | ||
name: "Bold", | ||
bytes: include_bytes!("../static/fonts/IBMPlexSans-Bold.ttf"), | ||
pub const BOLD: Font = Font { | ||
family: Family::Name("IBM Plex Sans"), | ||
weight: Weight::Bold, | ||
monospaced: false, | ||
stretch: Stretch::Normal, | ||
}; | ||
|
||
pub const MEDIUM: Font = Font::External { | ||
name: "Regular", | ||
bytes: include_bytes!("../static/fonts/IBMPlexSans-Medium.ttf"), | ||
pub const MEDIUM: Font = Font { | ||
family: Family::Name("IBM Plex Sans"), | ||
weight: Weight::Medium, | ||
monospaced: false, | ||
stretch: Stretch::Normal, | ||
}; | ||
|
||
pub const REGULAR: Font = Font::with_name("IBM Plex Sans"); | ||
|
||
pub const BOLD_BYTES: &[u8] = include_bytes!("../static/fonts/IBMPlexSans-Bold.ttf"); | ||
pub const MEDIUM_BYTES: &[u8] = include_bytes!("../static/fonts/IBMPlexSans-Medium.ttf"); | ||
pub const REGULAR_BYTES: &[u8] = include_bytes!("../static/fonts/IBMPlexSans-Regular.ttf"); | ||
|
||
pub const REGULAR: Font = Font::External { | ||
name: "Regular", | ||
bytes: REGULAR_BYTES, | ||
}; | ||
pub const ICONEX_ICONS_BYTES: &[u8] = include_bytes!("../static/icons/iconex/iconex-icons.ttf"); | ||
pub const BOOTSTRAP_ICONS_BYTE: &[u8] = include_bytes!("../static/icons/bootstrap-icons.ttf"); | ||
|
||
pub fn loads<T: From<Result<(), iced::font::Error>> + 'static>() -> Vec<Command<T>> { | ||
vec![ | ||
iced::font::load(BOLD_BYTES).map(T::from), | ||
iced::font::load(MEDIUM_BYTES).map(T::from), | ||
iced::font::load(REGULAR_BYTES).map(T::from), | ||
iced::font::load(ICONEX_ICONS_BYTES).map(T::from), | ||
iced::font::load(BOOTSTRAP_ICONS_BYTE).map(T::from), | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.