Package: pango

Function pango:font-glyph-extents

Lambda List

pango:font-glyph-extents (font glyph ink logical)

Arguments

font -- a pango:font object
glyph -- an unsigned integer for the glyph index
ink -- a pango:rectangle instance used to store the extents of the glyph as drawn or nil to indicate that the result is not needed
logical -- a pango:rectangle instance used to store the logical extents of the glyph or nil to indicate that the result is not needed

Details

Gets the logical and ink extents of a glyph within a font. The coordinate system for each rectangle has its origin at the base line and horizontal origin of the character with increasing coordinates extending to the right and down. The pango:ascent, pango:descent, pango:lbearing, and pango:rbearing functions can be used to convert from the extents rectangle to more traditional font metrics. The units of the rectangles are in (/ 1 pango:+scale+) of a device unit.

If the font argument is nil, this function gracefully sets some sane values in the output variables and returns.
 

See also

2024-3-5