Interface TextMetrics

The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method.

MDN Reference

interface TextMetrics {
    actualBoundingBoxAscent: number;
    actualBoundingBoxDescent: number;
    actualBoundingBoxLeft: number;
    actualBoundingBoxRight: number;
    alphabeticBaseline: number;
    emHeightAscent: number;
    emHeightDescent: number;
    fontBoundingBoxAscent: number;
    fontBoundingBoxDescent: number;
    hangingBaseline: number;
    ideographicBaseline: number;
    width: number;
}

Properties

actualBoundingBoxAscent: number

Returns the measurement described below.

MDN Reference

actualBoundingBoxDescent: number

Returns the measurement described below.

MDN Reference

actualBoundingBoxLeft: number

Returns the measurement described below.

MDN Reference

actualBoundingBoxRight: number

Returns the measurement described below.

MDN Reference

alphabeticBaseline: number

Returns the measurement described below.

MDN Reference

emHeightAscent: number

Returns the measurement described below.

MDN Reference

emHeightDescent: number

Returns the measurement described below.

MDN Reference

fontBoundingBoxAscent: number

Returns the measurement described below.

MDN Reference

fontBoundingBoxDescent: number

Returns the measurement described below.

MDN Reference

hangingBaseline: number

Returns the measurement described below.

MDN Reference

ideographicBaseline: number

Returns the measurement described below.

MDN Reference

width: number

Returns the measurement described below.

MDN Reference