draw_set_font

Sets the font used to draw text.

Syntax:

draw_set_font(font);


Argument Description
font The name of the font to use.


Returns: N/A


Description

This function will set the font to be used for all further text drawing. This font must have been added into the font assets of the game or have been created using either the font_add or font_add_sprite. You may also set this to -1 to default to drawing text using a 12point Arial font.


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.


Back: Drawing Text
Next: draw_set_halign
© Copyright YoYo Games Ltd. 2018 All Rights Reserved