Struct fontdue::FontSettings
source · pub struct FontSettings {
pub collection_index: u32,
pub scale: f32,
pub load_substitutions: bool,
}
Expand description
Settings for controlling specific font and layout behavior.
Fields§
§collection_index: u32
The default is 0. The index of the font to use if parsing a font collection.
scale: f32
The default is 40. The scale in px the font geometry is optimized for. Fonts rendered at the scale defined here will be the most optimal in terms of looks and performance. Glyphs rendered smaller than this scale will look the same but perform slightly worse, while glyphs rendered larger than this will looks worse but perform slightly better. The units of the scale are pixels per Em unit.
load_substitutions: bool
The default is true. If enabled, will load glyphs for substitutions (liagtures, etc.) from
the gsub table on compatible fonrs. Only makes a difference when using indexed operations,
i.e. Font::raserize_indexed
, as singular characters do not have enough context to be
substituted.
Trait Implementations§
source§impl Clone for FontSettings
impl Clone for FontSettings
source§fn clone(&self) -> FontSettings
fn clone(&self) -> FontSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FontSettings
impl Debug for FontSettings
source§impl Default for FontSettings
impl Default for FontSettings
source§fn default() -> FontSettings
fn default() -> FontSettings
source§impl PartialEq for FontSettings
impl PartialEq for FontSettings
source§fn eq(&self, other: &FontSettings) -> bool
fn eq(&self, other: &FontSettings) -> bool
self
and other
values to be equal, and is used
by ==
.