[][src]Struct fontdue::FontSettings

pub struct FontSettings {
    pub offset_x: f32,
    pub offset_y: f32,
    pub enable_offset_bounding_box: bool,
}

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.

Trait Implementations

impl Clone for FontSettings[src]

impl Copy for FontSettings[src]

impl Default for FontSettings[src]

impl PartialEq<FontSettings> for FontSettings[src]

impl StructuralPartialEq for FontSettings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.