public measureText(text as String) as TextMetrics
Estimates text metrics for the current font.
metrics = painter.measureText("Hello")