From 729565b5cac80dbfb10ff215c5d724a4556b766c Mon Sep 17 00:00:00 2001 From: Clownacy Date: Fri, 18 Sep 2020 02:05:37 +0100 Subject: [PATCH] Might as well not obscure the code --- src/Font.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Font.cpp b/src/Font.cpp index b08dcd56..dc3e4986 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -1082,10 +1082,10 @@ static Glyph* GetGlyph(Font *font, unsigned long unicode_value) const Glyph *local_glyph = &font->local_glyphs[index]; glyph->unicode_value = local_glyph->unicode_value; - glyph->width = local_glyph->width; - glyph->height = local_glyph->height; - glyph->x_offset = local_glyph->x_offset; - glyph->y_offset = local_glyph->y_offset; + glyph->width = font->glyph_slot_width; + glyph->height = font->glyph_slot_height; + glyph->x_offset = 0; + glyph->y_offset = 0; glyph->x_advance = local_glyph->x_advance; RenderBackend_UploadGlyph(font->atlas, glyph->x, glyph->y, &font->image_buffer[local_glyph->y * font->image_buffer_width + local_glyph->x], glyph->width, glyph->height, font->image_buffer_width);