config: add box-drawings-uses-font-glyphs=no|yes option

When disabled, we render box drawing characters ourselves. This is the
default.

When enabled, we instead use font glyphs. I.e. no special treatment.

Closes #430
This commit is contained in:
Daniel Eklöf 2021-04-09 23:19:20 +02:00
parent 2efd1016ce
commit ce321e663e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 30 additions and 1 deletions

View file

@ -466,7 +466,9 @@ render_cell(struct terminal *term, pixman_image_t *pix,
}
if (unlikely((base >= 0x2500 && base <= 0x259f) ||
(base >= 0x1fb00 && base <= 0x1fb3b))) {
(base >= 0x1fb00 && base <= 0x1fb3b)) &&
likely(!term->conf->box_drawings_uses_font_glyphs))
{
/* Box drawing characters */
size_t idx = base >= 0x1fb00 ? base - 0x1fb00 + 160 : base - 0x2500;
xassert(idx < ALEN(term->box_drawing));