pangoMacros: Pango Convenience Macros

Description Usage Arguments Details Value Author(s)

Description

These macros and constants help you layout text with Pango.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13

Arguments

x

A rectangle describing the glyph extents

size

A size on the Pango scale

.

Details

When positioning text, it is beneficial to know the extents of the glyphs being drawn. The macros pangoAscent, pangoDescent, pangoLbearing, and pangoRbearing perform simple math on the given rectangle (representing the glyph extents) to determine the corresponding properties. The "ascent" and "descent" are how high the glyph extends above and below the baseline, respectively. The "lbearing" and "rbearing" describe the left-most and right-most extents of the glyph.

The rest are merely constants for scaling. PANGO_SCALE is the factor by which device units are scaled to Pango units. To return to device units, use the pangoPixels. The rest are pre-fab factors for scaling by different degrees.

Value

The requested quantity in the units of the provided rectangle.

Author(s)

Michael Lawrence


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.

Related to pangoMacros in RGtk2...