font: populate glyph cache (ASCII characters only) when instantiating font

This commit is contained in:
Daniel Eklöf 2019-07-28 21:03:38 +02:00
parent 9e57ba2108
commit fe882bddba
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 44 additions and 82 deletions

9
main.c
View file

@ -896,12 +896,8 @@ out:
free(term.window_title);
tll_free_and_free(term.window_title_stack, free);
for (size_t i = 0; i < sizeof(term.fonts) / sizeof(term.fonts[0]); i++) {
struct font *f = &term.fonts[i];
if (f->face != NULL)
FT_Done_Face(f->face);
}
for (size_t i = 0; i < sizeof(term.fonts) / sizeof(term.fonts[0]); i++)
font_destroy(&term.fonts[i]);
if (term.flash.fd != -1)
close(term.flash.fd);
@ -921,4 +917,5 @@ out:
cairo_debug_reset_static_data();
return ret;
}