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

interface TextMetrics {
    actualBoundingBoxAscent: number;
    actualBoundingBoxDescent: number;
    actualBoundingBoxLeft: number;
    actualBoundingBoxRight: number;
    fontBoundingBoxAscent: number;
    fontBoundingBoxDescent: number;
    width: number;
}

Properties

actualBoundingBoxAscent: number

Returns the measurement described below.

actualBoundingBoxDescent: number

Returns the measurement described below.

actualBoundingBoxLeft: number

Returns the measurement described below.

actualBoundingBoxRight: number

Returns the measurement described below.

fontBoundingBoxAscent: number

Returns the measurement described below.

fontBoundingBoxDescent: number

Returns the measurement described below.

width: number

Returns the measurement described below.