mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
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.
This commit is contained in:
parent
f3d212224b
commit
4f4ee5b39d
1 changed files with 1 additions and 0 deletions
1
main.c
1
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue