Skip to content

Repository files navigation

Note

v1 won’t be developed further. See v2 for current work.

GaseousMarble

Draw Unicode text in GameMaker 8.2, with high performance and rich features.

Warning

Minimum system requirement: Windows 10, Version 1903.

Development

  1. Install Visual Studio 2026 with MSVC Build Tools for x64/x86 Preview.
  2. Install vcpkg.
  3. vcpkg install wil:x86-windows.
  4. Build clang-format 24 from LLVM if formatting is needed.

Credits

  • GMAPI (references their reverse engineering results only)
  • WIL

Reference

generate_font(font_path, sprite_path, font_size, charset, dense, smoothing, fill, stroke_width, stroke_fill, shadow_offset, shadow_fill)

Generate a font from font files.

gm_font(key, sprite_path)

Add a font generated by tools/utils.

Returned Value Description
1 Font already exists
0 OK
-1 Failed to open glyph data file
-2 Invalid glyph data header
-3 Glyph data is corrupted
-4 Failed to load font sprite
-100 Invalid argument

gm_free(key)

Free a font.

Returned Value Description
1 Font not found
0 OK

gm_clear()

Free all fonts.

gm_draw(x, y, text)

Draw a UTF-8 text.

Returned Value Description
0 OK
-1 Failed to decode text
-2 Failed to find line break points
-3 Invalid layout option

gm_width(text)

Get the width of the text.

Returned Value Description
Non-negative Text width
-1 Failed to decode text
-2 Failed to find line break points
-3 Invalid layout option

gm_height(text)

Get the height of the text.

Returned Value Description
Non-negative Text height
-1 Failed to decode text
-2 Failed to find line break points
-3 Invalid layout option

gm_set_font(key)

Set the current font.

Returned Value Description
0 OK
-1 Font not found

gm_get_font()

Get the current font.

Returned Value Description
Non-empty OK
Empty Font unspecified

gm_set_align3(halign, valign, justified)
gm_set_align(halign, valign)
gm_set_halign(halign)
gm_set_valign(valign)
gm_set_justified(justified)

Set the text alignment.

gm_get_halign()
gm_get_valign()
gm_is_justified()

Get the text alignment.

gm_set_color2(color_top, color_bottom)
gm_set_color(color)

Set the text color.

gm_get_color_top()
gm_get_color_bottom()

Get the text color.

gm_set_alpha(alpha)

Set the text alpha.

gm_get_alpha()

Get the text alpha.

gm_set_letter_spacing(letter_spacing)

Set the letter spacing of the text.

gm_get_letter_spacing()

Get the letter spacing of the text.

gm_set_word_spacing(word_spacing)

Set the word spacing of the text.

gm_get_word_spacing()

Get the word spacing of the text.

gm_set_paragraph_spacing(paragraph_spacing)

Set the paragraph spacing of the text.

gm_get_paragraph_spacing()

Get the paragraph spacing of the text.

gm_set_line_height(line_height)

Set the line spacing of the text.

gm_get_line_height()

Get the line spacing of the text.

gm_set_max_line_length(max_line_length)

Set the maximum line length of the text.

gm_get_max_line_length()

Get the maximum line length of the text.

gm_set_offset(x, y)

Set the text offset.

gm_get_offset_x()
gm_get_offset_y()

Get the text offset.

gm_set_scale(x, y)

Set the text scale.

Returned Value Description
0 OK
-1 Invalid argument

gm_get_scale_x()
gm_get_scale_y()

Get the text scale.

gm_set_rotation(rotation)

Set the text rotation.

gm_get_rotation()

Get the text rotation.

About

Draw Unicode text in GameMaker 8.2.

Topics

Resources

Stars

8 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages