summaryrefslogtreecommitdiffstats
path: root/core/src/font.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/font.rs')
-rw-r--r--core/src/font.rs17
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,
+}