term: clear box drawing glyph cache when reloading fonts

This commit is contained in:
Daniel Eklöf 2020-12-26 16:44:11 +01:00
parent 92dc581bea
commit 736c88c3fb
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;