aboutsummaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-11-12 20:54:56 +0100
committerdec05eba <dec05eba@protonmail.com>2024-11-12 20:54:56 +0100
commited42b0aca2751fa7671b883331b4cd6d05fb7951 (patch)
tree349cbfeadfe9e47a11aaece9f8fd47a31b5582e7 /src/graphics
parent3f69f6c63c49ba74b8fcd8357b9b7d0498486f95 (diff)
Fix text height (undefined variable use)
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/text.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/graphics/text.c b/src/graphics/text.c
index e872360..0280edb 100644
--- a/src/graphics/text.c
+++ b/src/graphics/text.c
@@ -56,6 +56,7 @@ static void mgl_text_for_each_codepoint(const mgl_text *self, codepoint_loop_cal
} else if(codepoint == '\n') {
kerning = 0.0f;
glyph_width = 0.0f;
+ glyph.size = (mgl_vec2i){ (int)glyph_width, (int)self->font->character_size };
} else {
if(mgl_font_get_glyph(self->font, codepoint, &glyph) == 0) {
kerning = mgl_font_get_kerning(self->font, prev_codepoint, codepoint);