mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
Implement pango support
Implements support for the pango: prefix in the font command. Closes #1903.
This commit is contained in:
parent
72ce50737d
commit
556ff5f50e
3 changed files with 15 additions and 4 deletions
|
|
@ -12,7 +12,16 @@ struct cmd_results *cmd_font(int argc, char **argv) {
|
|||
}
|
||||
char *font = join_args(argv, argc);
|
||||
free(config->font);
|
||||
config->font = strdup(font);
|
||||
|
||||
if (strncmp(font, "pango:", 6) == 0) {
|
||||
config->pango_markup = true;
|
||||
config->font = strdup(font + 6);
|
||||
} else {
|
||||
config->pango_markup = false;
|
||||
config->font = strdup(font);
|
||||
}
|
||||
|
||||
free(font);
|
||||
config_update_font_height(true);
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue