Introduce Weight enum to font
This commit is contained in:
parent
eb3cd3a321
commit
32309f0140
3 changed files with 18 additions and 2 deletions
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue