pub enum Hinting {
Disabled,
Enabled,
}Expand description
Metrics hinting strategy
Variants§
Disabled
No metrics hinting.
Glyphs will have subpixel coordinates.
This is the default.
Enabled
Metrics hinting.
Glyphs will be snapped to integral coordinates in the X-axis during layout. This can improve readability for smaller text and/or low-DPI screens.
However, in order to get the right effect, you must use physical coordinates during layout and avoid further scaling when rendering. Otherwise, the rounding errors can accumulate and glyph distances may look erratic.
In other words, metrics hinting makes layouting dependent of the target resolution.
Trait Implementations§
impl Copy for Hinting
impl Eq for Hinting
impl StructuralPartialEq for Hinting
Auto Trait Implementations§
impl Freeze for Hinting
impl RefUnwindSafe for Hinting
impl Send for Hinting
impl Sync for Hinting
impl Unpin for Hinting
impl UnwindSafe for Hinting
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