TtfFont

class TtfFont(val chars: CharSequence = CharacterSets.LATIN_ALL) : Font

Author

Colton Daily

Constructors

Link copied to clipboard
fun TtfFont(chars: CharSequence = CharacterSets.LATIN_ALL)

Functions

Link copied to clipboard
open override fun dispose()
Link copied to clipboard
open operator fun get(char: Char): GlyphMetrics?
open operator fun get(code: Int): GlyphMetrics?
Link copied to clipboard
open fun getKerning(first: Char, second: Char): Kerning?

Fetches the Kerning between two characters.

open override fun getKerning(first: Int, second: Int): Kerning?

Fetches the Kerning between two codepoints.

Link copied to clipboard
open fun getKerningAmount(scale: Float, first: Char, second: Char): Float

Fetches the Kerning.amount between two characters.

open fun getKerningAmount(scale: Float, first: Int, second: Int): Float

Fetches the Kerning.amount between two codepoint.

Link copied to clipboard
open fun isWhitespace(char: Char): Boolean

Determines if the character is considered whitespace.

Link copied to clipboard
open fun isWrapChar(char: Char): Boolean

Determines if the character is considered a "wrap" character.

Link copied to clipboard
fun load(data: ByteBuffer)

Properties

Link copied to clipboard
Link copied to clipboard
open override val glyphMetrics: Map<Int, GlyphMetrics>

The glyph metrics supported by this Font.

Link copied to clipboard
Link copied to clipboard
open override val metrics: FontMetrics

The font metrics of this Font

Link copied to clipboard
var unitsPerEm: Int = 0
Link copied to clipboard
open override var wrapChars: CharSequence

Additional characters besides whitespace where text is wrapped. Eg: a hyphen (-).