ThorVG WebCanvas API - v1.1.4
    Preparing search index...

    Interface TextMetricsBeta

    Describes the font metrics of a text object.

    Provides the basic vertical layout metrics used for text rendering, such as ascent, descent, and line spacing (linegap).

    interface TextMetrics {
        ascent: number;
        descent: number;
        linegap: number;
        advance: number;
    }
    Index
    ascent: number

    Distance from the baseline to the top of the highest glyph (usually positive).

    descent: number

    Distance from the baseline to the bottom of the lowest glyph (usually negative, as in TTF).

    linegap: number

    Additional spacing recommended between lines (leading).

    advance: number

    The total vertical advance between lines of text: ascent - descent + linegap (i.e., ascent + |descent| + linegap when descent is negative).