Implement pango support

Implements support for the pango: prefix in the font command.

Closes #1903.
This commit is contained in:
Ryan Dwyer 2018-05-05 12:53:49 +10:00
parent 72ce50737d
commit 556ff5f50e
3 changed files with 15 additions and 4 deletions

View file

@ -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);
}