draw_set_font

This function sets the font used for drawing text.

The font must have been added into the font assets of the game or have been created using either font_addfont_add_sprite or font_add_sprite_ext.

 

Syntax:

draw_set_font(font);

ArgumentTypeDescription
fontFont AssetThe name of the font to use, or -1 for the default font

 

Returns:

N/A

 

Example:

draw_set_colour(c_blue);
draw_set_font(fnt_Game);
draw_text(200, 200, "Hello World");

The above code will draw the given text using the font indexed in the variable fnt_Game and coloured blue.