From 4f4ee5b39dd4e9a7cbc71c73ac0f54e72a2169b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 20 Nov 2019 19:27:16 +0100 Subject: [PATCH] main: mention why we initialize a font set Since fonts are destroyed and removed from the font cache when the last instance is destroyed, closing the "last" terminal window in server mode would destroy the fonts, and their glyph caches. By instantiating the set in main, we ensure the fonts, and the glyph caches, remain. This makes launching new terminals (much) faster. Note that in "normal" (non-server) mode, this isn't really necessary, but also doesn't have any penalty. --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 65b01937..4a392533 100644 --- a/main.c +++ b/main.c @@ -190,6 +190,7 @@ main(int argc, char *const *argv) struct server *server = NULL; struct shutdown_context shutdown_ctx = {.term = &term, .exit_code = EXIT_FAILURE}; + /* This ensures we keep a set of fonts in the cache */ if (!initialize_fonts(&conf, fonts)) goto out;