From c0bd152218ab4ec4e9f8e27427d040a400824a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 5 May 2021 22:08:35 +0200 Subject: [PATCH] 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. --- box-drawing.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);