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
ReadonlyactualBoundingBoxAscent
actualBoundingBoxAscent: number
Returns the measurement described below.
ReadonlyactualBoundingBoxDescent
actualBoundingBoxDescent: number
Returns the measurement described below.
ReadonlyactualBoundingBoxLeft
actualBoundingBoxLeft: number
Returns the measurement described below.
ReadonlyactualBoundingBoxRight
actualBoundingBoxRight: number
Returns the measurement described below.
ReadonlyalphabeticBaseline
alphabeticBaseline: number
Returns the measurement described below.
ReadonlyemHeightAscent
emHeightAscent: number
Returns the measurement described below.
ReadonlyemHeightDescent
emHeightDescent: number
Returns the measurement described below.
ReadonlyfontBoundingBoxAscent
fontBoundingBoxAscent: number
Returns the measurement described below.
ReadonlyfontBoundingBoxDescent
fontBoundingBoxDescent: number
Returns the measurement described below.
ReadonlyhangingBaseline
hangingBaseline: number
Returns the measurement described below.
ReadonlyideographicBaseline
ideographicBaseline: number
Returns the measurement described below.
Readonlywidth
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