Phaser API Documentation

  Version: 
setFontFamily(family)

Description:

Set the font family.

Important: The font name must be quoted if it contains certain combinations of digits or special characters:

Text.setFont('"Press Start 2P"');

Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all quoted properly, too:

Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif');

Parameters:

name type description
family string

The font family.

Returns:
Description:

This Text object.

Since: 3.0.0