Name
ccontext:GlyphExtents -- get glyph extents
Synopsis
t = ccontext:GlyphExtents(glyphs[, offset, num_glyphs])
Function
Gets the extents for a glyphs array. The extents describe a user-space rectangle that encloses the "inked" portion of the glyphs, as they would be drawn by ccontext:ShowGlyphs(). Additionally, the XAdvance and YAdvance values indicate the amount by which the current point would be advanced by ccontext:ShowGlyphs().

Note that whitespace glyphs do not contribute to the size of the rectangle (Width and Height fields).

This function returns a table describing the glyph extents. See ccontext:TextExtents() for a description of all table members.

Inputs
glyphs
a glyphs array
offset
optional: offset into the array that specifies the starting glyph (defaults to 0 which means first glyph)
num_glyphs
optional: number of glyphs to show (defaults to -1 which means all glyphs)
Results
t
table containing the glyphs extents

Show TOC