Skip to content
glyph_index_path

glyph_index_path

Mojo function 🡭

glyph_index_path

fn def glyph_index_path(mut face: TTFFace, glyph_index: Int, pen_x: Float64, pen_y: Float64) -> Path

glyph_path addressed by glyph index rather than codepoint, the form a GSUB substitution’s output needs.

Args:

  • face (TTFFace): Face to read the glyph from, with a pixel size already set.
  • glyph_index (Int): Glyph to render.
  • pen_x (Float64): Glyph origin x, in pixel space.
  • pen_y (Float64): Glyph origin y, in pixel space.

Returns:

Path: The glyph’s outline as a Path, positioned at (pen_x, pen_y).

Raises: