字体


GameMaker Studio 2 has a number of functions that can be used to get information about the included font assets, as well as a further set of functions that can be used to change, add or remove fonts from your game at run-time. In particular the function font_add() can be used to add non-standard fonts, like Asian glyph fonts, in *.ttf format.

It is worth noting is that if you add a font to your game that doesn't have the glyphs required by the text you wish to write, then the unicode character 9647 (▯) is used to substitute those missing glyphs when rendering it in the draw event. So if your font doesn't have, for example, the ° symbol, then writing 90° will actually produce 90▯.

The following functions can be used to get information about font resources: