BMFontData provides the TextureData for TextPrograms by using the data of a embedded 8x8 pixels monospace bitmapfont.

Constructor

new(fontData:Array<Int>, ?fontRanges:Array<Array<Int>>)

Creates a new BMFontData instance and generates the x-tiled TextureData for all glyphes.

Parameters:

fontData

the data of BMFont or a custom class what defines the font-data.

fontRanges

is need if the custom font is limited by charcode-ranges

Variables

read onlylength:Int

The number of glyphes the font contains.

read onlytextureData:TextureData

The generated TextureData.

Methods

getTile(charCode:UInt):Int

Returns the tile-number of the TextElement to map the glyph to the charCode in depend of the ranges.

Parameters:

charCode

the ascii charcode