This built-in variable can be used to either get or set the texture page size when using the function font_add. On adding a font using that function, GameMaker Studio 2 will create a texture page cache of the required glyphs up to the size defined by this variable. The process is as follows:

If you think you require a larger or a smaller texture page size than the default 1024px that GameMaker Studio 2 uses, you can set the value using this built in variable. If you are not using the font_add() function, then setting this will have no effect on your games performance as fonts added in the IDE are cached on the regular texture pages (which you can control from the Font Editor and the Game Options for the target platform).




Real (maximum width/height in pixels)


font_texture_page_size = 512;
newfont = font_add( 'Arial', 24, true, true, 32, 128);

The above code sets the font cache texture page to a maximum size of 512px and then adds a new font to the game.