Package: cairo

Function cairo:glyph-extents

Lambda List

cairo:glyph-extents (cr glyphs)

Syntax

(cairo:glyph-extents cr glyphs) => xbearing, ybearing, width, height, xadvance, yadvance

Arguments

cr -- a cairo:context-t instance
glyphs -- a list of glyphs, each glyph is represented by an item that is a list for the (index x y) glyph values
index -- an unsigned integer for the glyph index in the font
x -- a number coerced to a double float for the offset in the x direction between the origin used for drawing the string and the orgin of this glyph
y -- a number coerced to a double float for the y direction between the orgin used for drawing the string and the origin of this glyph

Return Value

The double floats of the cairo:text-extents-t instance for the extents of glyphs.

Details

Gets the extents for a list of glyphs. The extents describe a user-space rectangle that encloses the "inked" portion of the glyphs, as they would be drawn by the cairo:show-glyphs function. Additionally, the xadvance and yadvance values indicate the amount by which the current point would be advanced by the cairo:show-glyphs function.

Note that whitespace glyphs do not contribute to the size of the rectangle width and height values.
 

See also

2025-1-29