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;
|
use std::hash::Hash;
|
||||||
|
|
||||||
/// A font.
|
/// A font.
|
||||||
|
|
@ -27,3 +28,18 @@ pub enum Font {
|
||||||
/// fixed width.
|
/// fixed width.
|
||||||
Monospace,
|
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)]
|
#![forbid(unsafe_code, rust_2018_idioms)]
|
||||||
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
#![allow(clippy::inherent_to_string, clippy::type_complexity)]
|
||||||
pub mod alignment;
|
pub mod alignment;
|
||||||
|
pub mod font;
|
||||||
pub mod keyboard;
|
pub mod keyboard;
|
||||||
pub mod mouse;
|
pub mod mouse;
|
||||||
pub mod time;
|
pub mod time;
|
||||||
|
|
@ -32,7 +33,6 @@ pub mod time;
|
||||||
mod background;
|
mod background;
|
||||||
mod color;
|
mod color;
|
||||||
mod content_fit;
|
mod content_fit;
|
||||||
mod font;
|
|
||||||
mod length;
|
mod length;
|
||||||
mod padding;
|
mod padding;
|
||||||
mod pixels;
|
mod pixels;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
//! Load and use fonts.
|
//! Load and use fonts.
|
||||||
pub use iced_core::Font;
|
pub use iced_core::font::*;
|
||||||
|
|
||||||
use crate::command::{self, Command};
|
use crate::command::{self, Command};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue