All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.ru.casperix.multiplatform.font.FontMetrics.kt Maven / Gradle / Ivy

There is a newer version: 1.3.0
Show newest version
package ru.casperix.multiplatform.font

/**
 *
 * ----------------------------------------------
 * /\          L
 * |           L
 * | ascent    L                    y    y
 * |           L                    y    y
 *\/           LLLLLLL               yyyy
 * --- baseline (y = 0, grow-down) -----y--------
 * /\                                   y
 * |                                   yy
 * | descent
 *\/
 * ----------------------------------------------
 * /\
 * | leading
 *\/
 * ---
 *
 */
data class FontMetrics(
    val ascent: Float,
    val descent: Float,
    val leading: Float,
) {
    val textHeight = ascent + descent
    val lineHeight = ascent + descent + leading
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy