diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-22 21:27:10 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-24 09:02:43 +0000 |
| commit | e2e28db7deb762830bf3a3d178a561b8e683ff8a (patch) | |
| tree | 99a24e62106b6d7c612bb7f18fb41b2982f13856 /render.c | |
| parent | render: render_osd(): don’t re-instantiate foreground color for each glyph (diff) | |
render: render_osd(): fix rendering of color bitmap glyphs
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -1606,12 +1606,17 @@ render_osd(struct terminal *term, if (glyph == NULL) continue; - pixman_image_t *src = pixman_image_create_solid_fill(&fg); - pixman_image_composite32( - PIXMAN_OP_OVER, src, glyph->pix, buf->pix[0], 0, 0, 0, 0, - x + x_ofs + glyph->x, y + term->font_y_ofs + font->ascent - glyph->y, - glyph->width, glyph->height); - pixman_image_unref(src); + if (pixman_image_get_format(glyph->pix) == PIXMAN_a8r8g8b8) { + pixman_image_composite32( + PIXMAN_OP_OVER, glyph->pix, NULL, buf->pix[0], 0, 0, 0, 0, + x + x_ofs + glyph->x, y + term->font_y_ofs + font->ascent - glyph->y, + glyph->width, glyph->height); + } else { + pixman_image_composite32( + PIXMAN_OP_OVER, src, glyph->pix, buf->pix[0], 0, 0, 0, 0, + x + x_ofs + glyph->x, y + term->font_y_ofs + font->ascent - glyph->y, + glyph->width, glyph->height); + } x += glyph->advance.x; } |
