diff options
-rw-r--r-- | src/graphics/text.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/graphics/text.c b/src/graphics/text.c index 76ac128..372def2 100644 --- a/src/graphics/text.c +++ b/src/graphics/text.c @@ -129,6 +129,8 @@ mgl_vec2f mgl_text_get_bounds(mgl_text *self) { self->bounds_dirty = false; if(self->text && self->text_size > 0 && self->font) self->bounds = mgl_text_calculate_bounds(self); + else if(self->font) + self->bounds = (mgl_vec2f){ 0.0f, (float)self->font->character_size }; else self->bounds = (mgl_vec2f){ 0.0f, 0.0f }; } |