Phaser API Documentation

  Version: 
<static> ParseFromAtlas(scene, fontName, textureKey, frameKey, xmlKey, [xSpacing], [ySpacing])

Description:

Parse an XML Bitmap Font from an Atlas.

Adds the parsed Bitmap Font data to the cache with the fontName key.

Parameters:

name type arguments description
scene Phaser.Scene

The Scene to parse the Bitmap Font for.

fontName string

The key of the font to add to the Bitmap Font cache.

textureKey string

The key of the BitmapFont's texture.

frameKey string

The key of the BitmapFont texture's frame.

xmlKey string

The key of the XML data of the font to parse.

xSpacing number <optional>

The x-axis spacing to add between each letter.

ySpacing number <optional>

The y-axis spacing to add to the line height.

Returns:
Description:

Whether the parsing was successful or not.

Type:
  • boolean