getWidth

fun getWidth(char: Char, fontId: String? = null): Int(source)

获取指定字体下的字符宽度并缓存结果。 Gets and caches the character width for the selected font.