telar_renderer_core/font_config.rs
1/// Shared font configuration for both software and hardware renderers. Lets callers supply extra fonts, raw font bytes, a system fonts directory, and preferred sans-serif families without duplicating these fields across renderer-specific config structs.
2#[derive(Clone)]
3pub struct FontConfig {
4 pub extra_font_paths: Vec<std::path::PathBuf>,
5 pub font_data: Vec<Vec<u8>>,
6 pub system_fonts_dir: Option<std::path::PathBuf>,
7 pub sans_serif_family_candidates: Vec<String>,
8}
9
10impl Default for FontConfig {
11 fn default() -> Self {
12 Self {
13 extra_font_paths: Vec::new(),
14 font_data: Vec::new(),
15 system_fonts_dir: None,
16 sans_serif_family_candidates: Vec::new(),
17 }
18 }
19}