summaryrefslogtreecommitdiffstats
path: root/core/src/font.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-05 18:26:09 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-02-24 13:36:02 +0100
commit32309f0140efb4ea92e3e35e3adc5c740909f196 (patch)
tree64a388d896c4ae1959b492fb742d3c6eaec10cc6 /core/src/font.rs
parenteb3cd3a321db48a4a4555575f022e9a0ed85063b (diff)
downloadiced-32309f0140efb4ea92e3e35e3adc5c740909f196.tar.gz
iced-32309f0140efb4ea92e3e35e3adc5c740909f196.tar.bz2
iced-32309f0140efb4ea92e3e35e3adc5c740909f196.zip
Introduce `Weight` enum to `font`
Diffstat (limited to 'core/src/font.rs')
-rw-r--r--core/src/font.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/src/font.rs b/core/src/font.rs
index 1f774a70..b67c08af 100644
--- a/core/src/font.rs
+++ b/core/src/font.rs
@@ -1,3 +1,4 @@
+//! Load and use fonts.
use std::hash::Hash;
/// A font.
@@ -27,3 +28,18 @@ pub enum Font {
/// fixed width.
Monospace,
}
+
+/// The weight of some text.
+#[allow(missing_docs)]
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
+pub enum Weight {
+ Thin,
+ ExtraLight,
+ Light,
+ Normal,
+ Medium,
+ Semibold,
+ Bold,
+ ExtraBold,
+ Black,
+}