iced_solstice/settings.rs
1//! Configure a renderer.
2pub use iced_graphics::Antialiasing;
3
4/// The settings of a [`Backend`].
5///
6/// [`Backend`]: crate::Backend
7#[derive(Debug, Clone, Copy, PartialEq, Eq)]
8pub struct Settings {
9 /// The bytes of the font that will be used by default.
10 ///
11 /// If `None` is provided, a default system font will be chosen.
12 pub default_font: Option<&'static [u8]>,
13
14 /// The default size of text.
15 ///
16 /// By default, it will be set to 20.
17 pub default_text_size: u16,
18
19 /// The antialiasing strategy that will be used for triangle primitives.
20 pub antialiasing: Option<Antialiasing>,
21}
22
23impl Default for Settings {
24 fn default() -> Settings {
25 Settings {
26 default_font: None,
27 default_text_size: 20,
28 antialiasing: None,
29 }
30 }
31}