meo-skia-canvas
    Preparing search index...

    Interface LineMetrics

    Measurements for one laid-out line, from Paragraph.getLineMetrics.

    All offsets index the paragraph's text in UTF-16 code units; all distances are in pixels.

    🧪 Not in the HTML Canvas standard.

    interface LineMetrics {
        ascent: number;
        baseline: number;
        descent: number;
        endExcludingWhitespaces: number;
        endIncludingNewline: number;
        endIndex: number;
        height: number;
        isHardBreak: boolean;
        left: number;
        lineNumber: number;
        startIndex: number;
        width: number;
    }
    Index
    ascent: number

    Distance from this line's baseline up to its top edge.

    baseline: number

    Distance from the top of the paragraph down to this line's baseline.

    descent: number

    Distance from this line's baseline down to its bottom edge.

    endExcludingWhitespaces: number

    As endIndex, with trailing whitespace trimmed.

    endIncludingNewline: number

    As endIndex, including the line break that ended the line, if any.

    endIndex: number

    Offset just past the line's last character.

    height: number

    Total height of the line box.

    isHardBreak: boolean

    Whether the line ended at a newline rather than at the wrap.

    left: number

    Left edge of the line, which is where alignment shows up.

    lineNumber: number

    Zero-based index of the line.

    startIndex: number

    Offset of the line's first character.

    width: number

    Width of the text on this line.