FontImageMap

class FontImageMap(val texture: ColorBuffer, val map: Map<Char, IntRectangle>, val glyphMetrics: Map<Char, GlyphMetrics>, val size: Double, val contentScale: Double, val ascenderLength: Double, val descenderLength: Double, val height: Double, val leading: Double, val name: String) : FontMap(source)

A type of FontMap which keeps characters pre-rendered in a ColorBuffer texture at a specific font size.

Constructors

Link copied to clipboard
constructor(texture: ColorBuffer, map: Map<Char, IntRectangle>, glyphMetrics: Map<Char, GlyphMetrics>, size: Double, contentScale: Double, ascenderLength: Double, descenderLength: Double, height: Double, leading: Double, name: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val ascenderLength: Double

The length of the ascender part of the font, which is the height above the baseline.

Link copied to clipboard
Link copied to clipboard
open override val descenderLength: Double

The length of the descender part of the font, which is the height below the baseline.

Link copied to clipboard
Link copied to clipboard
open override val height: Double

The total height of the font, combining ascender, descender, and other elements.

Link copied to clipboard

A mutable map that stores kerning values for pairs of characters.

Link copied to clipboard
open override val leading: Double

The vertical spacing between lines of text.

Link copied to clipboard
Link copied to clipboard
open override val name: String

The name of the font.

Link copied to clipboard
open override val size: Double

The size of the font.

Link copied to clipboard

Functions

Link copied to clipboard
fun characterWidth(character: Char): Double

Calculates the width of a given character based on its metrics in the font image map.

Link copied to clipboard
fun kerning(left: Char, right: Char): Double

Retrieves the kerning value between two characters.