pub enum Target {
Mono,
Smooth {
mode: SmoothMode,
symmetric_rendering: bool,
preserve_linear_metrics: bool,
},
}
Expand description
Defines the target settings for hinting.
Variants§
Mono
Strong hinting style that should only be used for aliased, monochromatic rasterization.
Corresponds to FT_LOAD_TARGET_MONO
in FreeType.
Smooth
Hinting style that is suitable for anti-aliased rasterization.
Corresponds to the non-monochrome load targets in FreeType. See
SmoothMode
for more detail.
Fields
mode: SmoothMode
The basic mode for smooth hinting.
Defaults to SmoothMode::Normal
.
symmetric_rendering: bool
If true, TrueType bytecode may assume that the resulting outline will be rasterized with supersampling in the vertical direction.
When this is enabled, ClearType fonts will often generate wider horizontal stems that may lead to blurry images when rendered with an analytical area rasterizer (such as the one in FreeType).
The effect of this setting is to control the “ClearType symmetric
rendering bit” of the TrueType GETINFO
instruction. For more
detail, see this issue.
FreeType has no corresponding setting and behaves as if this is always enabled.
This only applies to the TrueType interpreter.
Defaults to true
.
preserve_linear_metrics: bool
If true, prevents adjustment of the outline in the horizontal direction and preserves inter-glyph spacing.
This is useful for performing layout without concern that hinting will modify the advance width of a glyph. Specifically, it means that layout will not require evaluation of glyph outlines.
FreeType has no corresponding setting and behaves as if this is always disabled.
This applies to the TrueType interpreter and the automatic hinter.
Defaults to false
.
Trait Implementations§
source§impl From<SmoothMode> for Target
impl From<SmoothMode> for Target
source§fn from(value: SmoothMode) -> Self
fn from(value: SmoothMode) -> Self
source§impl From<Target> for HintingOptions
impl From<Target> for HintingOptions
impl Copy for Target
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)