Struct fontdue::FontSettings
source · pub struct FontSettings {
pub collection_index: u32,
pub scale: f32,
}
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.
Trait Implementations§
source§impl Clone for FontSettings
impl Clone for FontSettings
source§fn clone(&self) -> FontSettings
fn clone(&self) -> FontSettings
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Returns the “default value” for a type. Read more
source§impl PartialEq<FontSettings> for FontSettings
impl PartialEq<FontSettings> for FontSettings
source§fn eq(&self, other: &FontSettings) -> bool
fn eq(&self, other: &FontSettings) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.