Interface

Gjsgjs/cairodefaultFontExtents

Font metrics in user-space coordinates (cairo_font_extents_t). Not present in cairo-gobject GIR; defined locally to match the C API.

interface FontExtents {
    ascent: number;
    descent: number;
    height: number;
    maxXAdvance: number;
    maxYAdvance: number;
}
Index

Properties

ascent: number

Distance the font extends above the baseline

descent: number

Distance the font extends below the baseline (positive for typical fonts)

height: number

Recommended vertical distance between baselines for consecutive lines

maxXAdvance: number

Maximum X advance for any glyph

maxYAdvance: number

Maximum Y advance for any glyph (typically 0 for horizontal text)