font_exists

Returns whether a given font exists or not.

Syntax:

font_exists(ind);


Argument Description
ind Index of the font to check.


Returns: Boolean


Description

This function returns whether a font with the specified index exists or not. Please note, that the value used for checking must have been initialised previously or else you will get an error causing GameMaker: Studio to close.


Example:

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

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


Back: Fonts
Next: font_add
© Copyright YoYo Games Ltd. 2018 All Rights Reserved