[−][src]Struct fontdue::FontSettings
Settings for controlling specific font and layout behavior.
Fields
offset_x: f32
The default is 0.0. Offsets all glyphs in the font horizontally by the given offset. The unit of the offset is font units and varies by font. This can be used to make a font crisper at a specific scale, or correct a misaligned font.
offset_y: f32
The default is 0.0. Offsets all glyphs in the font vertically by the given offset. The unit of the offset is font units and varies by font. This can be used to make a font crisper at a specific scale, or correct a misaligned font.
enable_offset_bounding_box: bool
The default is true. This offsets glyphs relative to their position in their scaled bounding box. This is required for laying out glyphs correctly, but can be disabled to make some incorrect fonts crisper.
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.
Trait Implementations
impl Clone for FontSettings
[src]
fn clone(&self) -> FontSettings
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FontSettings
[src]
impl Default for FontSettings
[src]
fn default() -> FontSettings
[src]
impl PartialEq<FontSettings> for FontSettings
[src]
fn eq(&self, other: &FontSettings) -> bool
[src]
fn ne(&self, other: &FontSettings) -> bool
[src]
impl StructuralPartialEq for FontSettings
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,