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;
    max_x_advance: number;
    max_y_advance: 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

max_x_advance: number

Maximum X advance for any glyph

max_y_advance: number

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