diff options
-rw-r--r-- | core/src/font.rs | 16 | ||||
-rw-r--r-- | core/src/lib.rs | 2 | ||||
-rw-r--r-- | native/src/font.rs | 2 |
3 files changed, 18 insertions, 2 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, +} diff --git a/core/src/lib.rs b/core/src/lib.rs index d3596b4d..d7314851 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -25,6 +25,7 @@ #![forbid(unsafe_code, rust_2018_idioms)] #![allow(clippy::inherent_to_string, clippy::type_complexity)] pub mod alignment; +pub mod font; pub mod keyboard; pub mod mouse; pub mod time; @@ -32,7 +33,6 @@ pub mod time; mod background; mod color; mod content_fit; -mod font; mod length; mod padding; mod pixels; diff --git a/native/src/font.rs b/native/src/font.rs index 6840a25f..15359694 100644 --- a/native/src/font.rs +++ b/native/src/font.rs @@ -1,5 +1,5 @@ //! Load and use fonts. -pub use iced_core::Font; +pub use iced_core::font::*; use crate::command::{self, Command}; use std::borrow::Cow; |