font_get_name


Description

This function can be used to get the name (as a string) that was given to the font when it was added as an asset to the GameMaker Studio 2 resource tree. Please note that this is only a string and cannot be used to reference the font directly - for that you would need the font index. You can, however, use this string to get the font index using the returned string along with the function asset_get_index().


Syntax:

font_get_name(ind);


Argument Description
ind Index of the font to check.


Returns:

String


Example:

fnt_Name = font_get_name(font0);

The above code will get the name of a font resource as it appears in the resource tree and store it as a string in the variable "fnt_Name".