yog_book/font.rs
1//! Fonts of book text.
2
3use serde::{Deserialize, Serialize};
4
5/// The font of a `BookPage::CustomText`: a resource-pack font id —
6/// `assets/<ns>/font/<name>.json`, e.g. with a `ttf` provider — and the
7/// size its 9-pixel line is drawn at.
8#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct BookFont {
10 /// Font id (`"example:display"`).
11 pub font_id: String,
12 /// Line height in book pixels (e.g. 14.0).
13 pub size_px: f32,
14}