diff options
author | Hugo Osvaldo Barrera <hugo@barrera.io> | 2022-07-01 12:23:04 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-07-01 13:05:58 +0200 |
commit | 80e386fd97c0da00970f0acc007574151048cfbf (patch) | |
tree | df11d53184b20e3f1afe86b8272420349fd9b552 /swaynag/config.c | |
parent | 75605491a54f8647740fdba75dd2ad7bae9e0ca7 (diff) |
Reuse parsed PangoFontDescription
Avoids parsing the configured font each time text is rendered.
Diffstat (limited to 'swaynag/config.c')
-rw-r--r-- | swaynag/config.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |