mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
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.
This commit is contained in:
parent
9264d6695c
commit
c0bd152218
1 changed files with 3 additions and 1 deletions
|
|
@ -2415,7 +2415,9 @@ box_drawing(const struct terminal *term, wchar_t wc)
|
||||||
{
|
{
|
||||||
int width = term->cell_width;
|
int width = term->cell_width;
|
||||||
int height = term->cell_height;
|
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);
|
int stride = stride_for_format_and_width(fmt, width);
|
||||||
uint8_t *data = xcalloc(height * stride, 1);
|
uint8_t *data = xcalloc(height * stride, 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue