Enum font_kit::hinting::HintingOptions
source · [−]Expand description
Specifies how hinting (grid fitting) is to be performed (or not performed) for a glyph.
This affects both outlines and rasterization.
Variants
None
No hinting is performed unless absolutely necessary to assemble the glyph.
This corresponds to what macOS and FreeType in its “no hinting” mode do.
Vertical(f32)
Hinting is performed only in the vertical direction. The specified point size is used for grid fitting.
This corresponds to what DirectWrite and FreeType in its light hinting mode do.
VerticalSubpixel(f32)
Hinting is performed only in the vertical direction, and further tweaks are applied to make subpixel antialiasing look better. The specified point size is used for grid fitting.
This matches DirectWrite, GDI in its ClearType mode, and FreeType in its LCD hinting mode.
Full(f32)
Hinting is performed in both horizontal and vertical directions. The specified point size is used for grid fitting.
This corresponds to what GDI in non-ClearType modes and FreeType in its normal hinting mode do.
Implementations
sourceimpl HintingOptions
impl HintingOptions
sourcepub fn grid_fitting_size(&self) -> Option<f32>
pub fn grid_fitting_size(&self) -> Option<f32>
Returns the point size that will be used for grid fitting, if any.
Trait Implementations
sourceimpl Clone for HintingOptions
impl Clone for HintingOptions
sourcefn clone(&self) -> HintingOptions
fn clone(&self) -> HintingOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for HintingOptions
impl Debug for HintingOptions
sourceimpl PartialEq<HintingOptions> for HintingOptions
impl PartialEq<HintingOptions> for HintingOptions
sourcefn eq(&self, other: &HintingOptions) -> bool
fn eq(&self, other: &HintingOptions) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &HintingOptions) -> bool
fn ne(&self, other: &HintingOptions) -> bool
This method tests for !=.
impl Copy for HintingOptions
impl StructuralPartialEq for HintingOptions
Auto Trait Implementations
impl RefUnwindSafe for HintingOptions
impl Send for HintingOptions
impl Sync for HintingOptions
impl Unpin for HintingOptions
impl UnwindSafe for HintingOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more