15 lines
375 B
Rust
15 lines
375 B
Rust
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
|
|
pub struct FontSize(pub f32);
|
|
|
|
impl FontSize {
|
|
pub const SMALL: Self = Self(12);
|
|
pub const NORMAL: Self = Self(14);
|
|
pub const MEDIUM: Self = Self(16);
|
|
pub const LARGE: Self = Self(24);
|
|
pub const X_LARGE: Self = Self(30);
|
|
|
|
pub fn as_f32(&self) -> f32 {
|
|
self.0
|
|
}
|
|
}
|