ferroui_base/media/font_manager_options.rs
1use std::collections::HashMap;
2
3use crate::media::{FontFallback, FontFamily};
4
5/// Options to customize the behavior of the font manager.
6#[derive(Clone, Debug, Default)]
7pub struct FontManagerOptions {
8 /// Gets or sets the default font family's name.
9 pub default_family_name: Option<String>,
10 /// Gets or sets the font fallbacks.
11 ///
12 /// A fallback contains a family name and an optional `UnicodeRange`.
13 pub font_fallbacks: Option<Vec<FontFallback>>,
14 /// Gets or sets the font family mappings.
15 ///
16 /// A font family mapping is a dictionary that defines family names to be
17 /// replaced by a different font family. Names are matched ignoring case.
18 pub font_family_mappings: Option<HashMap<String, FontFamily>>,
19}