aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-05 20:08:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-17 15:58:30 +0000
commitc0bd152218ab4ec4e9f8e27427d040a400824a49 (patch)
tree82d34e0c86b05f0dd994f96e3ab128b657cd9676
parentbox-drawing: change_buffer_format: abort on pixman failure (diff)
box-drawing: use an a8 buffer when primary font is antialiased
This causes relevant box drawing characters (diagonals, arcs etc) to be antialiased as well.
-rw-r--r--box-drawing.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/box-drawing.c b/box-drawing.c
index 25021e31..39deab50 100644
--- a/box-drawing.c
+++ b/box-drawing.c
@@ -2415,7 +2415,9 @@ box_drawing(const struct terminal *term, wchar_t wc)
{
int width = term->cell_width;
int height = term->cell_height;
- pixman_format_code_t fmt = PIXMAN_a1; /* TODO: use a8 when antialiasing=true */
+
+ pixman_format_code_t fmt =
+ term->fonts[0]->antialias ? PIXMAN_a8 : PIXMAN_a1;
int stride = stride_for_format_and_width(fmt, width);
uint8_t *data = xcalloc(height * stride, 1);