CharSizes

object CharSizes

Functions

Link copied to clipboard

Calculates the ComponentSize from a sequence of CharOptions.

fun calculateComponentSize(component: Component, lang: String): ComponentSize

Calculates the ComponentSize of the given component under lang.

Link copied to clipboard
fun calculateComponentWidth(component: Component, lang: String = "en_us"): Float

Calculates the width of a component.

Link copied to clipboard

Calculates the width of string when rendered with font.

Link copied to clipboard
fun getCharWidth(font: String, char: Char): Float
fun getCharWidth(font: String, char: Int): Float

Gets the width of char when rendered with font.

Link copied to clipboard