diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics/font.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/graphics/font.c b/src/graphics/font.c index cad5790..603b1d4 100644 --- a/src/graphics/font.c +++ b/src/graphics/font.c @@ -59,6 +59,7 @@ int mgl_font_load_from_file(mgl_font *self, const mgl_memory_mapped_file *mapped self->ascent = round_float(font_scale * ascent); self->descent = round_float(font_scale * descent); self->linegap = round_float(font_scale * linegap); + self->max_glyph_height = self->character_size - self->descent; /* TODO: Use stbtt_GetCodepointSDF */ return 0; @@ -72,6 +73,7 @@ void mgl_font_unload(mgl_font *self) { self->ascent = 0; self->descent = 0; self->linegap = 0; + self->max_glyph_height = 0; free(self->font_info); self->font_info = NULL; |