getStringWidth

open override fun getStringWidth(text: FormattedCharSequence, shadow: Boolean = false): Float

Approximates the width of a text. Accurate except for obfuscated (§k) formatting