Skip to content

Commit

Permalink
Allow setting the font size to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate authored and emersion committed Feb 1, 2023
1 parent b88b1b6 commit 5218c04
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sway/commands/font.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 5218c04

Please sign in to comment.