Phaser API Documentation

  Version: 
setFont(font, [size], [align])

Description:

Changes the font this BitmapText is using to render.

The new texture is loaded and applied to the BitmapText. The existing test, size and alignment are preserved, unless overridden via the arguments.

Parameters:

name type arguments description
font string

The key of the font to use from the Bitmap Font cache.

size number <optional>

The font size of this Bitmap Text. If not specified the current size will be used.

align number <optional>

The alignment of the text in a multi-line BitmapText object. If not specified the current alignment will be used.

Returns:
Description:

This BitmapText Object.