aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-12-04 21:01:39 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-12-04 21:01:39 +0000
commitbafe7cab287f395b9e4b0eb9ee828e22b2b46180 (patch)
treeef0d2234fd7d94a8169ef9129a1841a615b11cc0
parentfcft: update to 0.3.5 (diff)
main: stop initializing a default set of fonts
-rw-r--r--main.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/main.c b/main.c
index fc007857..ed426d4b 100644
--- a/main.c
+++ b/main.c
@@ -60,23 +60,6 @@ term_shutdown_cb(void *data, int exit_code)
ctx->exit_code = exit_code;
}
-static bool
-initialize_fonts(const struct config *conf, struct font *fonts[4])
-{
- const size_t count = tll_length(conf->fonts);
- const char *names[count];
-
- size_t i = 0;
- tll_foreach(conf->fonts, it)
- names[i++] = it->item;
-
- return (
- (fonts[0] = font_from_name(names, count, "dpi=96")) != NULL &&
- (fonts[1] = font_from_name(names, count, "dpi=96:weight=bold")) != NULL &&
- (fonts[2] = font_from_name(names, count, "dpi=96:slant=italic")) != NULL &&
- (fonts[3] = font_from_name(names, count, "dpi=96:weight=bold:slant=italic")) != NULL);
-}
-
int
main(int argc, char *const *argv)
{
@@ -181,7 +164,6 @@ main(int argc, char *const *argv)
setlocale(LC_ALL, "");
- struct font *fonts[4] = {NULL};
struct fdm *fdm = NULL;
struct wayland *wayl = NULL;
struct terminal *term = NULL;
@@ -190,10 +172,6 @@ main(int argc, char *const *argv)
log_init(as_server ? LOG_FACILITY_DAEMON : LOG_FACILITY_USER);
- /* This ensures we keep a set of fonts in the cache */
- if (!initialize_fonts(&conf, fonts))
- goto out;
-
if ((fdm = fdm_init()) == NULL)
goto out;
@@ -237,9 +215,6 @@ out:
wayl_destroy(wayl);
fdm_destroy(fdm);
- for (size_t i = 0; i < sizeof(fonts) / sizeof(fonts[0]); i++)
- font_destroy(fonts[i]);
-
config_free(conf);
log_deinit();
return ret == EXIT_SUCCESS && !as_server ? shutdown_ctx.exit_code : ret;