From ddb5c42c19c12e566556f7659ba8060807af8791 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Wed, 26 Sep 2012 23:47:12 +0200 Subject: [PATCH] wlt: load font modules during startup We need the text-font modules to render fonts in wlterm. Therefore, load all the font modules during startup before initializing the application. Signed-off-by: David Herrmann --- src/wlt_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wlt_main.c b/src/wlt_main.c index ea5c8e4..34b8723 100644 --- a/src/wlt_main.c +++ b/src/wlt_main.c @@ -37,6 +37,7 @@ #include "conf.h" #include "eloop.h" #include "log.h" +#include "text.h" #include "wlt_main.h" #include "wlt_terminal.h" #include "wlt_theme.h" @@ -251,19 +252,24 @@ int main(int argc, char **argv) log_print_init("wlterm"); + kmscon_font_load_all(); + memset(&app, 0, sizeof(app)); ret = setup_app(&app); if (ret) - goto err_out; + goto err_unload; ev_eloop_run(app.eloop, -1); destroy_app(&app); + kmscon_font_unload_all(); conf_free(options, onum); log_info("exiting"); return EXIT_SUCCESS; +err_unload: + kmscon_font_unload_all(); err_out: conf_free(options, onum); log_err("cannot initialize wlterm, errno %d: %s", ret, strerror(-ret));