pub struct SmoothHinting {
pub light: bool,
pub symmetric_rendering: bool,
pub preserve_linear_metrics: bool,
}Expand description
Tuning for HintingTarget::Smooth, mirroring skrifa’s Target::Smooth.
Fields§
§light: boolHint only lightly: snap stems vertically but leave horizontal shapes
alone (FreeType’s “light” mode). Preserves the font’s proportions
better, at the cost of a little horizontal sharpness.
false uses the “normal” mode, which also fits horizontally.
Maps to SmoothMode::Light (true) vs SmoothMode::Normal (false).
symmetric_rendering: boolRender a glyph the same way regardless of its sub-pixel position.
true makes glyphs position-independent (better for caching and
animation), but a font’s instructions may then widen stems and look
slightly blurrier under an analytic rasterizer like egui’s.
Only affects fonts hinted via the TrueType interpreter (i.e. fonts
that ship their own instructions). It has no effect on the auto-hinter.
Mirrors Target::Smooth { symmetric_rendering }.
preserve_linear_metrics: boolKeep advance widths independent of hinting (don’t grid-fit horizontally in a way that changes spacing).
true keeps inter-glyph spacing identical to the unhinted font, so
layout never depends on hinting — but it also prevents horizontal
grid-fitting, leaving vertical stems softer on low-dpi screens.
false lets the (auto)hinter snap horizontally for crisper stems.
egui positions glyphs from the shaper’s advances, not the hinted
outline, so this mainly affects sharpness here, not layout.
Mirrors Target::Smooth { preserve_linear_metrics }.
Trait Implementations§
Source§impl Clone for SmoothHinting
impl Clone for SmoothHinting
Source§fn clone(&self) -> SmoothHinting
fn clone(&self) -> SmoothHinting
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 SmoothHinting
Source§impl Debug for SmoothHinting
impl Debug for SmoothHinting
Source§impl Default for SmoothHinting
impl Default for SmoothHinting
Source§fn default() -> SmoothHinting
fn default() -> SmoothHinting
impl Eq for SmoothHinting
Source§impl PartialEq for SmoothHinting
impl PartialEq for SmoothHinting
impl StructuralPartialEq for SmoothHinting
Auto Trait Implementations§
impl Forget for SmoothHinting
impl Freeze for SmoothHinting
impl Move for SmoothHinting
impl RefUnwindSafe for SmoothHinting
impl Send for SmoothHinting
impl Sync for SmoothHinting
impl Unpin for SmoothHinting
impl UnsafeUnpin for SmoothHinting
impl UnwindSafe for SmoothHinting
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