字体


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. 因此,如果你的字体没有例如 ° 符号,那么写 90° 实际上会产生90▯。

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