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 moreimpl Copy for HintingTarget
Source§impl Debug for HintingTarget
impl Debug for HintingTarget
Source§impl Default for HintingTarget
impl Default for HintingTarget
Source§fn default() -> HintingTarget
fn default() -> HintingTarget
impl Eq for HintingTarget
Source§impl PartialEq for HintingTarget
impl PartialEq for HintingTarget
impl StructuralPartialEq for HintingTarget
Auto Trait Implementations§
impl Forget for HintingTarget
impl Freeze for HintingTarget
impl Move for HintingTarget
impl RefUnwindSafe for HintingTarget
impl Send for HintingTarget
impl Sync for HintingTarget
impl Unpin for HintingTarget
impl UnsafeUnpin for HintingTarget
impl UnwindSafe for HintingTarget
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more