diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/font.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/src/font.rs b/core/src/font.rs index 920b3dd5..bb425fd6 100644 --- a/core/src/font.rs +++ b/core/src/font.rs @@ -8,6 +8,8 @@ pub struct Font { pub family: Family, /// The [`Weight`] of the [`Font`]. pub weight: Weight, + /// The [`Stretch`] of the [`Font`]. + pub stretch: Stretch, /// Whether if the [`Font`] is monospaced or not. pub monospaced: bool, } @@ -17,6 +19,7 @@ impl Font { pub const DEFAULT: Font = Font { family: Family::SansSerif, weight: Weight::Normal, + stretch: Stretch::Normal, monospaced: false, }; @@ -81,3 +84,19 @@ pub enum Weight { ExtraBold, Black, } + +/// The width of some text. +#[allow(missing_docs)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] +pub enum Stretch { + UltraCondensed, + ExtraCondensed, + Condensed, + SemiCondensed, + #[default] + Normal, + SemiExpanded, + Expanded, + ExtraExpanded, + UltraExpanded, +} |