measureText
measureText(
text,font):object
Defined in: labels/measure.ts:34
Measure a label’s screen box (CSS px) for collision. font is a canvas font shorthand
(no /line-height — strip it first). Width is measured; height is the font size × 1.25 (a
consistent row box; 11px → 14, matching the estimates this replaces).
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”object
height
Section titled “height”height:
number
width:
number