FontMetrics

data class FontMetrics(val size: Float = 0.0f, val top: Float = 0.0f, val ascent: Float = 0.0f, val baseline: Float = 0.0f, val descent: Float = 0.0f, val bottom: Float = 0.0f, val leading: Float = 0.0f, val maxWidth: Float = 0.0f, val capHeight: Float = 0.0f, val padding: FontMetrics.Padding = Padding(0, 0, 0, 0))

Holds data that describes a Font to be used for rendering glyphs.

Author

Colton Daily

See also

Constructors

Link copied to clipboard
fun FontMetrics(size: Float = 0.0f, top: Float = 0.0f, ascent: Float = 0.0f, baseline: Float = 0.0f, descent: Float = 0.0f, bottom: Float = 0.0f, leading: Float = 0.0f, maxWidth: Float = 0.0f, capHeight: Float = 0.0f, padding: FontMetrics.Padding = Padding(0, 0, 0, 0))

Types

Link copied to clipboard
data class Padding(val top: Int, val right: Int, val bottom: Int, val left: Int)

Properties

Link copied to clipboard
val ascent: Float = 0.0f

The ascent

Link copied to clipboard
val baseline: Float = 0.0f

The base line

Link copied to clipboard
val bottom: Float = 0.0f

The descent + line gap

Link copied to clipboard
val capHeight: Float = 0.0f
Link copied to clipboard
val descent: Float = 0.0f

The descent

Link copied to clipboard

'E' height

Link copied to clipboard
val leading: Float = 0.0f

Extra height

Link copied to clipboard

'É' + 'j' + line gap

Link copied to clipboard
val maxWidth: Float = 0.0f

The max width

Link copied to clipboard
Link copied to clipboard
val size: Float = 0.0f

The size of the font

Link copied to clipboard
val top: Float = 0.0f

The max top for any character such as É