Note
v1 won't be developed further. See v2 for current work.
Draw Unicode text in GameMaker 8.2, with high performance and rich features.
Warning
Minimum requirement: Windows 10, Version 1903.
| Function | Description | Returned Value |
|---|---|---|
gm_font(key, sprite_path) |
Add a font generated by tools/generate_font. |
1 - Font already exists0 - OK-1 - Failed to open file-2 - Invalid header-3 - Data corrupted-4 - Failed to load sprite-100 - Invalid argument |
gm_free(key) |
Free a font. | 1 - Font not found0 - OK |
gm_clear() |
Free all fonts. | Always OK |
gm_draw(x, y, str) |
Draw a UTF-8 string. | 0 - OK-1 - Failed to decode-2 - Failed to word break-3 - Invalid option |
gm_width(str) |
Return the width of the text. | >= 0 - Width-1 - Failed to decode-2 - Failed to word break-3 - Invalid option |
gm_height(str) |
Return the height of the text. | >= 0 - Height-1 - Failed to decode-2 - Failed to word break-3 - Invalid option |
| Setter | Getter | Returned Value |
|---|---|---|
gm_set_font(key) |
gm_get_font() |
Setter0 - OK-1 - Font not foundGetter != "" - OK"" - Font unspecified |
gm_set_halign(halign)gm_set_valign(valign)gm_set_justified(justified)gm_set_align(halign, valign)gm_set_align3(halign, valign, justified) |
gm_get_halign()gm_get_valign()gm_is_justified() |
Always OK |
gm_set_color(color)gm_set_color2(color_top, color_bottom) |
gm_get_color_top()gm_get_color_bottom() |
Always OK |
gm_set_alpha(alpha) |
gm_get_alpha() |
Always OK |
gm_set_letter_spacing(letter_spacing) |
gm_get_letter_spacing() |
Always OK |
gm_set_word_spacing(word_spacing) |
gm_get_word_spacing() |
Always OK |
gm_set_paragraph_spacing(paragraph_spacing) |
gm_get_paragraph_spacing() |
Always OK |
gm_set_line_height(line_height) |
gm_get_line_height() |
Always OK |
gm_set_max_line_length(max_line_length) |
gm_get_max_line_length() |
Always OK |
gm_set_offset(x, y) |
gm_get_offset_x()gm_get_offset_y() |
Always OK |
gm_set_scale(x, y) |
gm_get_scale_x()gm_get_scale_y() |
Setter0 - OK-1 - Invalid argumentGetter Always OK |
gm_set_rotation(rotation) |
gm_get_rotation() |
Always OK |
- Install Visual Studio 2026 and vcpkg.
vcpkg install wil:x86-windows.