Phaser API Documentation

  Version: 
setFont(font, [updateText])

Description:

Set the font.

If a string is given, the font family is set.

If an object is given, the fontFamily, fontSize and fontStyle properties of that object are set.

Parameters:

name type arguments Default description
font string | object

The font family or font settings to set.

updateText boolean <optional> true

Whether to update the text immediately.

Returns:
Description:

The parent Text object.

Examples:
Since: 3.0.0