pub(super) struct TrueTypeHinter {
instance: HintInstance,
tables: Option<Yoke<HintTables<'static>, Arc<Tables>>>,
scale: Option<Scale26Dot6>,
ppem: f32,
pedantic: bool,
hdmx_widths: Option<Range<usize>>,
scratch_lengths: ScratchLengths,
}Expand description
The interpreter, configured for one font at one size.
Fields§
§instance: HintInstance§tables: Option<Yoke<HintTables<'static>, Arc<Tables>>>The tables the interpreter reads, parsed once per font and yoked to the tables they borrow.
scale: Option<Scale26Dot6>§ppem: f32The interpreter’s size, rounded for a font that requests whole pixel sizes.
pedantic: bool§hdmx_widths: Option<Range<usize>>The byte range of the widths in the hdmx record for the size.
scratch_lengths: ScratchLengthsImplementations§
Source§impl TrueTypeHinter
impl TrueTypeHinter
Sourcepub(super) fn reconfigure(
&mut self,
font: &Font,
ppem: f32,
hinting: &HintOptions,
) -> Result<(), ScaleError>
pub(super) fn reconfigure( &mut self, font: &Font, ppem: f32, hinting: &HintOptions, ) -> Result<(), ScaleError>
Runs the font and control value programs for font at ppem.
Sourcepub(super) fn is_enabled(&self) -> bool
pub(super) fn is_enabled(&self) -> bool
Returns true if glyphs are hinted at this size.
The control value program or the gasp table can disable hinting
for a size.
Sourcepub(super) fn program_unhinted_ppem(&self) -> Option<f32>
pub(super) fn program_unhinted_ppem(&self) -> Option<f32>
Returns the size for an unhinted draw when the control value program disabled hinting.
This is the interpreter’s size, because FreeType chooses its scale
before it reads the program’s flag. Returns None when hinting is on
or when the gasp table disabled it. FreeType checks gasp before
choosing a scale, so it draws at the requested size.
Sourcepub(super) fn ppem(&self) -> Option<f32>
pub(super) fn ppem(&self) -> Option<f32>
Returns the size the interpreter hints at, once configured.
pub(super) fn raster_policy(&self) -> RasterPolicy
Sourcepub(super) fn required_memory_size(&self, outline: &GlyfGlyph<'_>) -> usize
pub(super) fn required_memory_size(&self, outline: &GlyfGlyph<'_>) -> usize
Returns the bytes of working memory needed to draw outline.
This covers the loader’s buffers and the interpreter’s.