glyph_index_metrics
Mojo function 🡭
glyph_index_metrics
fn def glyph_index_metrics(mut face: TTFFace, glyph_index: Int) -> GlyphMetricsOne glyph’s advance/bearing/size, in pixels, addressed by glyph index rather than codepoint – what a glyph GSUB substitution produced has, since a ligature stands for several characters and none of their codepoints names it.
Args:
- face (
TTFFace): Face to measure against, with a pixel size already set. - glyph_index (
Int): Glyph to measure.
Returns:
GlyphMetrics: The glyph’s advance/bearing/width/height at that size.
Raises: