Interface TextMetrics
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;
}
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
Readonly
actualBoundingBoxAscent
actualBoundingBoxAscent: number
Returns the measurement described below.
Readonly
actualBoundingBoxDescent
actualBoundingBoxDescent: number
Returns the measurement described below.
Readonly
actualBoundingBoxLeft
actualBoundingBoxLeft: number
Returns the measurement described below.
Readonly
actualBoundingBoxRight
actualBoundingBoxRight: number
Returns the measurement described below.
Readonly
alphabeticBaseline
alphabeticBaseline: number
Returns the measurement described below.
Readonly
emHeightAscent
emHeightAscent: number
Returns the measurement described below.
Readonly
emHeightDescent
emHeightDescent: number
Returns the measurement described below.
Readonly
fontBoundingBoxAscent
fontBoundingBoxAscent: number
Returns the measurement described below.
Readonly
fontBoundingBoxDescent
fontBoundingBoxDescent: number
Returns the measurement described below.
Readonly
hangingBaseline
hangingBaseline: number
Returns the measurement described below.
Readonly
ideographicBaseline
ideographicBaseline: number
Returns the measurement described below.
Readonly
width
width: number
Returns the measurement described below.
The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method.
MDN Reference