-
Notifications
You must be signed in to change notification settings - Fork 4
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
f32644f
commit 6596466
Showing
25 changed files
with
2,101 additions
and
2,053 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
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,19 +1,42 @@ | ||
use iced::Font; | ||
|
||
/// Iosevka Fixed Extended Thin - Weight 100 | ||
pub const THIN: Font = Font::External { | ||
name: "Iosevka Extended Thin", | ||
bytes: include_bytes!("../fonts/iosevka-fixed-extendedthin.ttf"), | ||
}; | ||
// name: "Iosevka Extended Thin", | ||
pub const THIN: &[u8] = include_bytes!("../fonts/iosevka-fixed-extendedthin.ttf"); | ||
|
||
/// Iosevka Fixed Extended Light - Weight 300 | ||
pub const LIGHT: Font = Font::External { | ||
name: "Iosevka Extended Light", | ||
bytes: include_bytes!("../fonts/iosevka-fixed-extendedlight.ttf"), | ||
}; | ||
// name: "Iosevka Extended Light", | ||
pub const LIGHT: &[u8] = include_bytes!("../fonts/iosevka-fixed-extendedlight.ttf"); | ||
|
||
/// Iosevka Fixed Extended Medium - Weight 500 | ||
pub const MEDIUM: Font = Font::External { | ||
name: "Iosevka Extended Medium", | ||
bytes: include_bytes!("../fonts/iosevka-fixed-extendedmedium.ttf"), | ||
}; | ||
// name: "Iosevka Extended Medium", | ||
pub const MEDIUM: &[u8] = include_bytes!("../fonts/iosevka-fixed-extendedmedium.ttf"); | ||
|
||
pub enum Font { | ||
Thin, | ||
Light, | ||
Medium, | ||
} | ||
|
||
impl Font { | ||
fn name(&self) -> &'static str { | ||
"Iosevka Fixed" | ||
} | ||
|
||
fn weight(&self) -> iced::font::Weight { | ||
match self { | ||
Font::Thin => iced::font::Weight::Thin, | ||
Font::Light => iced::font::Weight::Light, | ||
Font::Medium => iced::font::Weight::Medium, | ||
} | ||
} | ||
} | ||
|
||
impl From<Font> for iced::Font { | ||
fn from(font: Font) -> Self { | ||
iced::Font { | ||
family: iced::font::Family::Name(font.name()), | ||
weight: font.weight(), | ||
stretch: iced::font::Stretch::Expanded, | ||
monospaced: true, | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pub mod data; | ||
pub mod font; | ||
pub mod screen; | ||
pub mod style; | ||
|
||
pub type Element<'a, Message> = iced::Element<'a, Message, iced::Renderer<crate::style::Theme>>; |
Oops, something went wrong.