Reuse parsed PangoFontDescription

Avoids parsing the configured font each time text is rendered.
This commit is contained in:
Hugo Osvaldo Barrera 2022-07-01 12:23:04 +02:00 committed by Simon Ser
parent 75605491a5
commit 80e386fd97
11 changed files with 52 additions and 49 deletions

View file

@ -6,6 +6,7 @@
#include "../include/config.h"
#include "list.h"
#include "util.h"
#include <pango/pangocairo.h>
struct box_colors {
uint32_t border;
@ -28,7 +29,7 @@ struct swaybar_config {
char *status_command;
bool pango_markup;
uint32_t position; // zwlr_layer_surface_v1_anchor
char *font;
PangoFontDescription *font_description;
char *sep_symbol;
char *mode;
char *hidden_state;