Struct fontdue::FontSettings
source · [−]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
sourceimpl Clone for FontSettings
impl Clone for FontSettings
sourcefn clone(&self) -> FontSettings
fn clone(&self) -> FontSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for FontSettings
impl Debug for FontSettings
sourceimpl Default for FontSettings
impl Default for FontSettings
sourcefn default() -> FontSettings
fn default() -> FontSettings
Returns the “default value” for a type. Read more
sourceimpl PartialEq<FontSettings> for FontSettings
impl PartialEq<FontSettings> for FontSettings
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &FontSettings) -> bool
fn ne(&self, other: &FontSettings) -> bool
This method tests for !=
.
impl Copy for FontSettings
impl StructuralPartialEq for FontSettings
Auto Trait Implementations
impl RefUnwindSafe for FontSettings
impl Send for FontSettings
impl Sync for FontSettings
impl Unpin for FontSettings
impl UnwindSafe for FontSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more