aboutsummaryrefslogtreecommitdiff
path: root/src/graphics/font.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-04-18 15:14:31 +0200
committerdec05eba <dec05eba@protonmail.com>2025-04-18 15:14:31 +0200
commit5500ce377a0a552bfa858232f7086c197d0ab458 (patch)
tree491d9666e1535c4059b4ac37836517cf8b424867 /src/graphics/font.c
parent0e12a1d216b85c8e864cc2d7d18c3d18864542c5 (diff)
Wayland rendering now works
Diffstat (limited to 'src/graphics/font.c')
-rw-r--r--src/graphics/font.c2
1 files changed, 1 insertions, 1 deletions
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;