diff options
author | 2023-11-29 22:28:31 +0100 | |
---|---|---|
committer | 2023-11-29 22:28:31 +0100 | |
commit | e09b4e24dda51b8212d8ece52431dacaa3922a7b (patch) | |
tree | 7005e181528134ebdde5bbbe5909273db9f30174 /core/src/font.rs | |
parent | 83c7870c569a2976923ee6243a19813094d44673 (diff) | |
parent | 7f8b17604a31e00becc43130ec516c1a53552c88 (diff) | |
download | iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.gz iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.tar.bz2 iced-e09b4e24dda51b8212d8ece52431dacaa3922a7b.zip |
Merge branch 'master' into feat/multi-window-support
Diffstat (limited to 'core/src/font.rs')
-rw-r--r-- | core/src/font.rs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/src/font.rs b/core/src/font.rs index bb425fd6..2b68decf 100644 --- a/core/src/font.rs +++ b/core/src/font.rs @@ -10,8 +10,8 @@ pub struct Font { pub weight: Weight, /// The [`Stretch`] of the [`Font`]. pub stretch: Stretch, - /// Whether if the [`Font`] is monospaced or not. - pub monospaced: bool, + /// The [`Style`] of the [`Font`]. + pub style: Style, } impl Font { @@ -20,13 +20,12 @@ impl Font { family: Family::SansSerif, weight: Weight::Normal, stretch: Stretch::Normal, - monospaced: false, + style: Style::Normal, }; /// A monospaced font with normal [`Weight`]. pub const MONOSPACE: Font = Font { family: Family::Monospace, - monospaced: true, ..Self::DEFAULT }; @@ -100,3 +99,13 @@ pub enum Stretch { ExtraExpanded, UltraExpanded, } + +/// The style of some text. +#[allow(missing_docs)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] +pub enum Style { + #[default] + Normal, + Italic, + Oblique, +} |