font_get_name

Returns the resource name of a given font.

Syntax:

font_get_name(ind);


Argument Description
ind Index of the font to check.


Returns: String


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 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().


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".


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