From 8baa0649be661ee5d6210c23f411a36b6726b460 Mon Sep 17 00:00:00 2001 From: crudelios Date: Tue, 22 Dec 2020 16:26:53 +0000 Subject: [PATCH] Fix transparent characters on multibyte fonts Fix #179 --- src/graphics/image.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/graphics/image.c b/src/graphics/image.c index 7ddcbc823e..3bc6e626c8 100644 --- a/src/graphics/image.c +++ b/src/graphics/image.c @@ -913,27 +913,27 @@ static void draw_multibyte_letter(font_t font, const image *img, const color_t * { switch (font) { case FONT_NORMAL_WHITE: - draw_uncompressed(img, data, x + 1, y + 1, 0x311c10, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x + 1, y + 1, 0xff311c10, DRAW_TYPE_BLEND_ALPHA); draw_uncompressed(img, data, x, y, COLOR_WHITE, DRAW_TYPE_BLEND_ALPHA); break; case FONT_NORMAL_RED: - draw_uncompressed(img, data, x + 1, y + 1, 0xe7cfad, DRAW_TYPE_BLEND_ALPHA); - draw_uncompressed(img, data, x, y, 0x731408, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x + 1, y + 1, 0xffe7cfad, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x, y, 0xff731408, DRAW_TYPE_BLEND_ALPHA); break; case FONT_NORMAL_GREEN: - draw_uncompressed(img, data, x + 1, y + 1, 0xe7cfad, DRAW_TYPE_BLEND_ALPHA); - draw_uncompressed(img, data, x, y, 0x311c10, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x + 1, y + 1, 0xffe7cfad, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x, y, 0xff311c10, DRAW_TYPE_BLEND_ALPHA); break; case FONT_NORMAL_PLAIN: - draw_uncompressed(img, data, x, y + 2, color, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x, y + 2, ALPHA_OPAQUE | color, DRAW_TYPE_BLEND_ALPHA); break; case FONT_NORMAL_BLACK: case FONT_LARGE_BLACK: - draw_uncompressed(img, data, x + 1, y + 1, 0xcead9c, DRAW_TYPE_BLEND_ALPHA); - draw_uncompressed(img, data, x, y, color, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x + 1, y + 1, 0xffcead9c, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x, y, ALPHA_OPAQUE | color, DRAW_TYPE_BLEND_ALPHA); break; default: - draw_uncompressed(img, data, x, y, color, DRAW_TYPE_BLEND_ALPHA); + draw_uncompressed(img, data, x, y, ALPHA_OPAQUE | color, DRAW_TYPE_BLEND_ALPHA); break; } }