From 5500ce377a0a552bfa858232f7086c197d0ab458 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 18 Apr 2025 15:14:31 +0200 Subject: Wayland rendering now works --- src/graphics/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/graphics/font.c') diff --git a/src/graphics/font.c b/src/graphics/font.c index 12235f6..671d8a1 100644 --- a/src/graphics/font.c +++ b/src/graphics/font.c @@ -210,7 +210,7 @@ int mgl_font_get_glyph(mgl_font *self, uint32_t codepoint, mgl_font_glyph *glyph /* TODO: Use stbtt_MakeGlyphBitmapSubpixelPrefilter instead for better text quality */ const size_t pixels_width = (width + GLYPH_PADDING * 2); const size_t pixels_height = (height + GLYPH_PADDING * 2); - const size_t pixels_size = pixels_width * pixels_height; + const size_t pixels_size = pixels_width * pixels_height * 2; // *2 required for opengl glTexSubImage2D unsigned char *pixels = calloc(pixels_size, 1); if(pixels) { const int top_padding = GLYPH_PADDING; -- cgit v1.2.3-70-g09d2