pub enum HintingTarget {
Mono,
Smooth(SmoothHinting),
}Expand description
How to hint glyph outlines, i.e. how aggressively to nudge them onto the
pixel grid before rasterizing. Mirrors skrifa::outline::Target.
Hinting trades shape fidelity for sharpness: snapping stems to whole pixels makes text crisp at small sizes / low dpi, at the cost of slightly distorting the designer’s outlines. At high dpi it matters little.
This only has an effect if the font is actually hinted — either it ships
TrueType instructions, or it was auto-hinted (see FontTweak::hinting).
Used by FontTweak::hinting_target.
Variants§
Mono
Strongest hinting, designed for aliased 1-bit (black & white) rendering.
Snaps stems hard to the pixel grid for maximum sharpness. egui always
renders anti-aliased, so in practice this looks much like Self::Smooth
here; it mostly exists for completeness. Maps to skrifa’s Target::Mono.
Smooth(SmoothHinting)
Hinting tuned for anti-aliased rendering. This is what you normally want,
and what egui uses by default. Maps to skrifa’s Target::Smooth.
Trait Implementations§
Source§impl Clone for HintingTarget
impl Clone for HintingTarget
Source§fn clone(&self) -> HintingTarget
fn clone(&self) -> HintingTarget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more