Class: BitmapFontMetrics

gameobjects~BitmapFontMetrics(config)

A helper config object for calculating the positions of a BitmapFont.

Constructor

new BitmapFontMetrics(config)

Parameters:
Name Type Description
config object A configuration object that describes how the bitmap is structured.
Properties
Name Type Attributes Default Description
width number <optional>
8 The width in pixels of a single character.
height number <optional>
8 The height in pixels of a single character.
chars string <optional>
See source code Which character is in which position.
charsPerRow number <optional>
16 The number of characters in a row in the bitmap.
Source:

Methods

getCharData(char) → {object}

Get the position data of a character.
Parameters:
Name Type Description
char string A string with exactly one character.
Source:
Returns:
pos - The characters position data. {x, y}
Type
object