chickadee » sdl2-ttf » glyph-metrics

glyph-metrics font glyphprocedure

Return various metrics about the given glyph. This procedure returns multiple values:

min-x
the glyph's minimum X offset
max-x
the glyph's maximum X offset
min-y
the glyph's minimum Y offset
max-y
the glyph's maximum Y offset
advance
the glyph's advance offset

See TTF_GlyphMetrics. There is a diagram which shows what these metrics mean.

glyph may be an integer (representing a 16-bit Unicode character) or a Scheme character in the ASCII range. Results may be incorrect if given a Scheme character outside the ASCII range.

Signals an exception of kind (exn sdl2) if an error occurs.