1use std::path::PathBuf;
2use std::collections::BTreeMap;
3
4use serde::{Serialize, Deserialize};
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct FontMetadata {
8 pub atlas_path: PathBuf,
9 pub atlas_width: u32,
10 pub atlas_height: u32,
11 pub line_height: u32,
12 pub glyphs: BTreeMap<String, GlyphMetadata>,
13}
14
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct GlyphMetadata {
17 pub x: u32,
18 pub y: u32,
19 pub width: u32,
20 pub height: u32,
21 pub hori_bearing_x: i32,
22 pub hori_bearing_y: i32,
23 pub advance_x: i32,
24 pub advance_y: i32,
25}