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
.