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

    Interface GlyphMetricsBeta

    Describes the layout metrics of a glyph.

    Provides the basic layout metrics used for positioning an individual glyph, including its advance along the baseline direction, bearing relative to the inline axis origin, and its bounding box in local glyph space.

    The advance value represents the distance the pen position moves along the baseline (inline direction), regardless of whether the text is laid out horizontally or vertically.

    The bounding box is defined in the glyph's local coordinate space and is independent of any layout direction or transformation.

    interface GlyphMetrics {
        advance: number;
        bearing: number;
        min: { x: number; y: number };
        max: { x: number; y: number };
    }
    Index
    advance: number

    The advance distance along the baseline (inline) direction.

    bearing: number

    The bearing from the origin to the glyph's visible bound along the inline-start direction.

    min: { x: number; y: number }

    The minimum point of the glyph bounding box in local space.

    max: { x: number; y: number }

    The maximum point of the glyph bounding box in local space.