diff options
author | Erik Reider <[email protected]> | 2023-02-14 16:51:29 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-02-14 10:51:29 -0500 |
commit | e78fc3364b0440ff82becbec4ae57458374a145f (patch) | |
tree | 0eb825dcc36401438543dbb6fd32ec700b4b90b7 /sway/commands/font.c | |
parent | 3efd3b558fe49bc7a7f3c30c19783e3fe5efeb24 (diff) |
upstream update: merge sway 1.8.1 (#111)
Diffstat (limited to 'sway/commands/font.c')
-rw-r--r-- | sway/commands/font.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/commands/font.c b/sway/commands/font.c index 74bb6b9f..dd80281f 100644 --- a/sway/commands/font.c +++ b/sway/commands/font.c @@ -33,10 +33,10 @@ struct cmd_results *cmd_font(int argc, char **argv) { return cmd_results_new(CMD_FAILURE, "Invalid font family."); } - const gint size = pango_font_description_get_size(font_description); - if (size == 0) { + const PangoFontMask flags = pango_font_description_get_set_fields(font_description); + if ((flags & PANGO_FONT_MASK_SIZE) == 0) { pango_font_description_free(font_description); - return cmd_results_new(CMD_FAILURE, "Invalid font size."); + return cmd_results_new(CMD_FAILURE, "Font size not given."); } if (config->font_description != NULL) { |