From 736c88c3fbc5c08df2eba704b6ee542dcd55db97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 26 Dec 2020 16:44:11 +0100 Subject: [PATCH] term: clear box drawing glyph cache when reloading fonts --- terminal.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/terminal.c b/terminal.c index 1a0a9cf9..6ba04677 100644 --- a/terminal.c +++ b/terminal.c @@ -618,6 +618,14 @@ term_set_fonts(struct terminal *term, struct fcft_font *fonts[static 4]) term->fonts[i] = fonts[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]); + term->box_drawing[i] = NULL; + } + } + const int old_cell_width = term->cell_width; const int old_cell_height = term->cell_height;