pub enum Engine {
Interpreter,
Auto(Option<GlyphStyles>),
AutoFallback,
}Expand description
Specifies the backend to use when applying hints.
Variants§
Interpreter
The TrueType or PostScript interpreter.
Auto(Option<GlyphStyles>)
The automatic hinter that performs just-in-time adjustment of outlines.
Glyph styles can be precomputed per font and may be provided here as an optimization to avoid recomputing them for each instance.
AutoFallback
Selects the engine based on the same rules that FreeType uses when
neither of the FT_LOAD_NO_AUTOHINT or FT_LOAD_FORCE_AUTOHINT
load flags are specified.
Specifically, PostScript (CFF/CFF2) fonts will always use the hinting
engine in the PostScript interpreter and TrueType fonts will use the
interpreter for TrueType instructions if one of the fpgm or prep
tables is non-empty, falling back to the automatic hinter otherwise.
This uses OutlineGlyphCollection::prefer_interpreter to make a
selection.
Implementations§
Source§impl Engine
impl Engine
Sourcefn resolve_auto_fallback(self, outlines: &OutlineGlyphCollection<'_>) -> Engine
fn resolve_auto_fallback(self, outlines: &OutlineGlyphCollection<'_>) -> Engine
Converts the AutoFallback variant into either Interpreter or
Auto based on the given outline set’s preference for interpreter
mode.