From 80e386fd97c0da00970f0acc007574151048cfbf Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Fri, 1 Jul 2022 12:23:04 +0200 Subject: Reuse parsed PangoFontDescription Avoids parsing the configured font each time text is rendered. --- swaynag/config.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'swaynag/config.c') diff --git a/swaynag/config.c b/swaynag/config.c index 9aeec3c2..a0bf3197 100644 --- a/swaynag/config.c +++ b/swaynag/config.c @@ -227,7 +227,9 @@ int swaynag_parse_options(int argc, char **argv, struct swaynag *swaynag, case 'f': // Font if (type) { free(type->font); + pango_font_description_free(type->font_description); type->font = strdup(optarg); + type->font_description = pango_font_description_from_string(type->font); } break; case 'l': // Detailed Message -- cgit v1.2.3