box-drawing: compensate for non-zero {horizontal,vertical}-letter-offsets

Box drawing characters should always cover the entire cell. No more,
no less.
This commit is contained in:
Daniel Eklöf 2021-01-07 11:18:25 +01:00
parent 3eba48d74b
commit 389570b274
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -6,6 +6,7 @@
#define LOG_MODULE "box-drawing" #define LOG_MODULE "box-drawing"
#define LOG_ENABLE_DBG 0 #define LOG_ENABLE_DBG 0
#include "log.h" #include "log.h"
#include "config.h"
#include "macros.h" #include "macros.h"
#include "stride.h" #include "stride.h"
#include "terminal.h" #include "terminal.h"
@ -2068,8 +2069,8 @@ box_drawing(const struct terminal *term, wchar_t wc)
.wc = wc, .wc = wc,
.cols = 1, .cols = 1,
.pix = pix, .pix = pix,
.x = 0, .x = -term->conf->horizontal_letter_offset,
.y = term->fonts[0]->ascent, .y = term->conf->vertical_letter_offset + term->fonts[0]->ascent,
.width = width, .width = width,
.height = height, .height = height,
.advance = { .advance = {