From 16a0eeae4fa852587dacab3ebca57620c8c7f999 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 27 Apr 2026 05:29:22 +0900 Subject: [PATCH 1/3] fix font rendering --- src/text/ft2.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/text/ft2.c b/src/text/ft2.c index fef3f05..df63a27 100644 --- a/src/text/ft2.c +++ b/src/text/ft2.c @@ -123,7 +123,6 @@ static int ft2_MwTextWidth(MwFLFont ttf, const char* text) { text = old_text; } - tw -= ttf->face->glyph->advance.x >> 6; tw += ttf->face->glyph->bitmap_left + ttf->face->glyph->bitmap.width; return tw + 1; From 4e78157e71864f84657f4cec4eda22a61dd56f3f Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 27 Apr 2026 05:50:05 +0900 Subject: [PATCH 2/3] why? --- src/backend/x11.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/backend/x11.c b/src/backend/x11.c index 7cae9e1..1cb06f8 100644 --- a/src/backend/x11.c +++ b/src/backend/x11.c @@ -489,8 +489,6 @@ static void MwLLBeginDrawImpl(MwLL handle) { static void MwLLEndDrawImpl(MwLL handle) { (void)handle; - - XClearWindow(handle->x11.display, handle->x11.window); } static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { From e65d4e7f32250f7612c47906d2357e82ecf64465 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 27 Apr 2026 05:50:50 +0900 Subject: [PATCH 3/3] fix font rendering --- src/text/ft2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text/ft2.c b/src/text/ft2.c index df63a27..37bed4e 100644 --- a/src/text/ft2.c +++ b/src/text/ft2.c @@ -59,7 +59,7 @@ static int ft2_MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const c for(cy = 0; cy < bmp->rows; cy++) { for(cx = 0; cx < bmp->width; cx++) { - int ox = x + cx + (ttf->face->glyph->metrics.horiBearingX >> 6) + ttf->face->glyph->bitmap_left; + int ox = x + cx + ttf->face->glyph->bitmap_left; int oy = y + (ttf->face->height * ttf->px / ttf->face->units_per_EM) - ttf->face->glyph->bitmap_top + cy + (ttf->face->descender * ttf->px / ttf->face->units_per_EM); unsigned char* opx = &px[(oy * tw + ox) * 4]; opx[0] = color->common.red;