Interface: TextMetrics
Defined in: types/desktop-engine.d.ts:1513
The size of a text as fillText draws it, from the point it's drawn at (its textAlign and textBaseline). The font's ascent and descent are Safari's: whole pixels, Helvetica, Times and Courier a little taller; textBaseline "top" and "hanging" are at the ascent, "bottom" and "ideographic" at the descent, "middle" halfway between them, as in Safari (Chrome puts them on the font's em box, a pixel or two inside)
Properties
actualBoundingBoxAscent
readonly actualBoundingBoxAscent: number;Defined in: types/desktop-engine.d.ts:1517
How far the glyphs reach above the textBaseline
actualBoundingBoxDescent
readonly actualBoundingBoxDescent: number;Defined in: types/desktop-engine.d.ts:1519
How far the glyphs reach below the textBaseline
actualBoundingBoxLeft
readonly actualBoundingBoxLeft: number;Defined in: types/desktop-engine.d.ts:1521
How far the glyphs reach to the left of the textAlign's point (negative when they start to its right) (API 5)
actualBoundingBoxRight
readonly actualBoundingBoxRight: number;Defined in: types/desktop-engine.d.ts:1523
How far the glyphs reach to the right of the textAlign's point (API 5)
alphabeticBaseline
readonly alphabeticBaseline: number;Defined in: types/desktop-engine.d.ts:1531
Where textBaseline "alphabetic" draws, as hangingBaseline (API 5)
fontBoundingBoxAscent
readonly fontBoundingBoxAscent: number;Defined in: types/desktop-engine.d.ts:1525
The font's ascent above the textBaseline, the same for any text (API 5)
fontBoundingBoxDescent
readonly fontBoundingBoxDescent: number;Defined in: types/desktop-engine.d.ts:1527
The font's descent below the textBaseline (API 5)
hangingBaseline
readonly hangingBaseline: number;Defined in: types/desktop-engine.d.ts:1529
Where textBaseline "hanging" draws: above the textBaseline, below it if negative (API 5)
ideographicBaseline
readonly ideographicBaseline: number;Defined in: types/desktop-engine.d.ts:1533
Where textBaseline "ideographic" draws (the bottom of the font's descent), as hangingBaseline (API 5)
width
readonly width: number;Defined in: types/desktop-engine.d.ts:1515
Text width
