1use std::collections::HashMap;
6
7#[derive(Debug, Clone)]
11pub struct FontFamily {
12 pub name: String,
14 pub fonts: HashMap<FontWeight, TTFFont>,
16}
17
18#[derive(Debug, Clone, Eq, PartialEq)]
20pub struct TTFFont {
21 pub name: String,
23 pub path: String,
25}
26
27#[allow(missing_docs)]
29#[derive(Debug, Clone, Eq, PartialEq)]
30pub enum FontWeight {
31 Black = 900,
32 ExtraBold = 800,
33 Bold = 700,
34 SemiBold = 600,
35 Medium = 500,
36 Regular = 400,
37 Light = 300,
38 ExtraLight = 200,
39 Thin = 100,
40}
41
42impl Default for FontWeight {
43 fn default() -> Self {
44 FontWeight::Regular
45 }
46}