A single Font character descriptor.

Constructor

new(t:Tile, w:Float)

Create a new font character.

Parameters:

t

The character Tile.

width

The horizontal advance of the character.

Variables

private@:dox(show)kerning:Null<Kerning>

Linked list of kerning values.

In order to add new kerning values use FontChar.addKerning and FontChar.getKerningOffset to retrieve kerning offsets.

t:Tile

A Tile representing position of a character on the texture.

width:Float

Horizontal advance value of the character.

On top of advance, letter spacing is affected by FontChar.kerning matches and Text.letterSpacing.

Methods

addKerning(prevChar:Int, offset:Int):Void

Adds a new kerning to the character with specified prevChar and offset.

clone():FontChar

Clones the character instance.

getKerningOffset(prevChar:Int):Float

Returns kerning offset for a pair [prevChar, currentChar] or 0 if there was no paired kerning value.