aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-12-26 15:24:16 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-01 20:09:31 +0000
commit7acdb3a0dd5633ac79aa7664df300b1fdbe715f0 (patch)
tree4829dac899ff813f95b430d4f528f3015e27895b /terminal.c
parentdoc: foot.ini: remove FONT FORMAT section, expand description of ‘font’ (diff)
box-drawing: add infrastructure for rendering box drawing characters ourselves
* ‘term’ struct contains an array of 160 fcft glyph pointers * the glyph pointers are lazily allocated when we need to draw a box drawings character * Filtering out box drawings characters is easy - they are (except unicode 13, which isn’t handled yet )all in a single range.
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index ecb4e6cc..1a0a9cf9 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1412,6 +1412,13 @@ term_destroy(struct terminal *term)
for (size_t i = 0; i < 4; i++)
free(term->font_sizes[i]);
+ for (size_t i = 0; i < ALEN(term->box_drawing); i++) {
+ if (term->box_drawing[i] != NULL) {
+ pixman_image_unref(term->box_drawing[i]->pix);
+ free(term->box_drawing[i]);
+ }
+ }
+
free(term->search.buf);
if (term->render.workers.threads != NULL) {