Returns the index of the last character in a given font.



Argument Description
ind Index of the font to check.

Returns: Real


When defining a font in GameMaker: Studio, you can define a range of characters to include. This is because the font itself is not actually included with your game (for legal reasons) but an image of the font is included on a texture page and that is what your game will use (just like any other graphics asset). This means that you will want to keep the number of characters that you use to a minimum and specify only the range of characters that your game will need so as to keep texture memory as optimised as possible. This function can be used to find the last character (as an UTF8 value) that was used when your font asset was added to your game.


num = font_get_last(fnt_Main);

The above code will store the ASCII value of the last letter of the font range for the font indexed in "fnt_Main".

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