From 1196bf355c5bb16f39bafcb45b221502fb3656d8 Mon Sep 17 00:00:00 2001 From: Takase <20792268+takase1121@users.noreply.github.com> Date: Sun, 15 Oct 2023 04:16:36 +0800 Subject: [PATCH] fix: dim rendering when antialiasing is turned off (#1641) --- src/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer.c b/src/renderer.c index f4dbcc78..0e36aaa1 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -167,7 +167,7 @@ static void font_load_glyphset(RenFont* font, int idx) { for (unsigned int column = 0; column < slot->bitmap.width; ++column) { int current_source_offset = source_offset + (column / 8); int source_pixel = slot->bitmap.buffer[current_source_offset]; - pixels[++target_offset] = ((source_pixel >> (7 - (column % 8))) & 0x1) << 7; + pixels[++target_offset] = ((source_pixel >> (7 - (column % 8))) & 0x1) * 0xFF; } } else memcpy(&pixels[target_offset], &slot->bitmap.buffer[source_offset], slot->bitmap.width);