Skip to content

Commit

Permalink
Fix transparent characters on multibyte fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
crudelios committed Dec 22, 2020
1 parent 63d8e89 commit 8baa064
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/graphics/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 8baa064

Please sign in to comment.