cranpose_ui_graphics/
typography.rs1#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5pub enum FontStyle {
6 Normal,
7 Italic,
8 Oblique,
9}
10
11#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
13pub struct FontWeight(pub u16);
14
15impl FontWeight {
16 pub const THIN: FontWeight = FontWeight(100);
17 pub const EXTRA_LIGHT: FontWeight = FontWeight(200);
18 pub const LIGHT: FontWeight = FontWeight(300);
19 pub const NORMAL: FontWeight = FontWeight(400);
20 pub const MEDIUM: FontWeight = FontWeight(500);
21 pub const SEMI_BOLD: FontWeight = FontWeight(600);
22 pub const BOLD: FontWeight = FontWeight(700);
23 pub const EXTRA_BOLD: FontWeight = FontWeight(800);
24 pub const BLACK: FontWeight = FontWeight(900);
25}
26
27#[derive(Clone, Debug, Default, PartialEq)]
29pub struct TextStyle {
30 pub font_family: Option<String>,
31 pub font_size: Option<f32>,
32 pub font_weight: Option<FontWeight>,
33 pub font_style: Option<FontStyle>,
34 pub letter_spacing: Option<f32>,
35 pub line_height: Option<f32>,
36}