-
Notifications
You must be signed in to change notification settings - Fork 56
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
f8bdc68
commit b9de40a
Showing
3 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
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,9 +1,23 @@ | ||
use iced::Command; | ||
use iced::Font; | ||
|
||
pub const BOLD: Font = Font::with_name("IBMPlexSans-Bold"); | ||
pub const BOLD: Font = Font::with_name("IBM Plex Sans"); | ||
pub const MEDIUM: Font = Font::with_name("IBMPlexSans-Medium"); | ||
pub const REGULAR: Font = Font::with_name("IBMPlexSans-Regular"); | ||
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 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