pub(crate) struct Scale {
pub x_scale: i32,
pub y_scale: i32,
pub x_delta: i32,
pub y_delta: i32,
pub size: f32,
pub units_per_em: i32,
pub flags: u32,
}
Expand description
Captures scaling parameters which may be modified during metrics computation.
Fields§
§x_scale: i32
Font unit to 26.6 scale in the X direction.
y_scale: i32
Font unit to 26.6 scale in the Y direction.
x_delta: i32
In 1/64 device pixels.
y_delta: i32
In 1/64 device pixels.
size: f32
Font size in pixels per em.
units_per_em: i32
From the source font.
flags: u32
Flags that determine hinting functionality.
Implementations§
Source§impl Scale
Scaler flags that determine hinting settings.
impl Scale
Scaler flags that determine hinting settings.
See https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/autofit/aftypes.h#L115 and https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/autofit/aflatin.h#L143
Sourcepub const HORIZONTAL_SNAP: u32 = 1u32
pub const HORIZONTAL_SNAP: u32 = 1u32
Stem width snapping.
Sourcepub const VERTICAL_SNAP: u32 = 2u32
pub const VERTICAL_SNAP: u32 = 2u32
Stem height snapping.
Sourcepub const STEM_ADJUST: u32 = 4u32
pub const STEM_ADJUST: u32 = 4u32
Stem width/height adjustment.
Sourcepub const NO_HORIZONTAL: u32 = 16u32
pub const NO_HORIZONTAL: u32 = 16u32
Disable horizontal hinting.
Sourcepub const NO_VERTICAL: u32 = 32u32
pub const NO_VERTICAL: u32 = 32u32
Disable vertical hinting.
Sourcepub const NO_ADVANCE: u32 = 64u32
pub const NO_ADVANCE: u32 = 64u32
Disable advance hinting.
Trait Implementations§
impl Copy for Scale
Auto Trait Implementations§
impl Freeze for Scale
impl RefUnwindSafe for Scale
impl Send for Scale
impl Sync for Scale
impl Unpin for Scale
impl UnwindSafe for Scale
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more