Method

PangoFontget_glyph_extents

Declaration [src]

void
pango_font_get_glyph_extents (
  PangoFont* font,
  PangoGlyph glyph,
  PangoRectangle* ink_rect,
  PangoRectangle* logical_rect
)

Description [src]

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 macros PANGO_ASCENT(), PANGO_DESCENT(), PANGO_LBEARING(), and PANGO_RBEARING() 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 font is NULL, this function gracefully sets some sane values in the output variables and returns.

Parameters

glyph

Type: PangoGlyph

The glyph index.

ink_rect

Type: PangoRectangle

Rectangle used to store the extents of the glyph as drawn.

The argument will be set by the function.
The argument can be NULL.
The returned data is owned by the instance.
logical_rect

Type: PangoRectangle

Rectangle used to store the logical extents of the glyph.

The argument will be set by the function.
The argument can be NULL.
The returned data is owned by the instance.