euv_core/style/text_prop/enum.rs
1/// Font weight classification consistent across native and web renderers.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum FontWeight {
4 /// Light weight (`300`).
5 Light,
6 /// Regular weight (`400`).
7 #[default]
8 Normal,
9 /// Medium weight (`500`).
10 Medium,
11 /// Semi-bold weight (`600`).
12 SemiBold,
13 /// Bold weight (`700`).
14 Bold,
15}
16
17/// Horizontal text alignment within its layout box.
18#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub enum TextAlign {
20 /// Left-aligned text.
21 #[default]
22 Left,
23 /// Centered text.
24 Center,
25 /// Right-aligned text.
26 Right,
27}
28
29/// Text overflow handling when a line exceeds available width.
30#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
31pub enum TextOverflow {
32 /// Wrap text across multiple lines.
33 #[default]
34 Wrap,
35 /// Clip overflowing glyphs cleanly.
36 Clip,
37 /// Truncate single line with trailing ellipsis.
38 Ellipsis,
39}
40
41/// Font family semantic category.
42#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
43pub enum FontFamily {
44 /// Clean geometric sans-serif UI font.
45 #[default]
46 Sans,
47 /// Fixed-width monospace font for code and metrics.
48 Monospace,
49 /// Serif editorial font.
50 Serif,
51}