font_exists

This function returns whether a font with the specified index exists or not. You can check font indices as defined from the Asset Browser, or fonts that have been added using functions like font_add().

 

Syntax:

font_exists(ind);

Argument Type Description
ind Font Asset Index of the font to check.

 

Returns:

Boolean

 

Example:

if (font_exists(fnt_Main))
{
    draw_set_font(fnt_Main);
}

This will set the active drawing font to fnt_Main if it exists.