widthOf

abstract fun widthOf(text: CharSequence, indentationColumns: Int, startColumn: Int = 0): Float

Calculates the width of text in pixels. indentationColumns and startColumn are required to correctly work out the width of a tab character.