Skip to content
glyph_metrics

glyph_metrics

Mojo function 🡭

glyph_metrics

fn def glyph_metrics(mut face: TTFFace, codepoint: Int) -> GlyphMetrics

This character’s advance/bearing/size, in pixels.

Args:

  • face (TTFFace): Face to measure against, with a pixel size already set.
  • codepoint (Int): Unicode codepoint to measure.

Returns:

GlyphMetrics: The glyph’s advance/bearing/width/height at that size.

Raises: