mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-17 05:33:52 -04:00
config: add font-bold, font-italic and font-bold-italic options
These options lets the user configure custom fonts and styles, to use with the bold and italic cell attributes. By default, they are unset, meaning we use the bold/italic variants of the regular font. Closes #169.
This commit is contained in:
parent
b507d3a55e
commit
2c101a21ee
8 changed files with 155 additions and 69 deletions
11
main.c
11
main.c
|
|
@ -27,6 +27,7 @@
|
|||
#include "server.h"
|
||||
#include "shm.h"
|
||||
#include "terminal.h"
|
||||
#include "util.h"
|
||||
#include "version.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
|
|
@ -387,11 +388,13 @@ main(int argc, char *const *argv)
|
|||
if (login_shell)
|
||||
conf.login_shell = true;
|
||||
if (tll_length(conf_fonts) > 0) {
|
||||
tll_foreach(conf.fonts, it)
|
||||
config_font_destroy(&it->item);
|
||||
tll_free(conf.fonts);
|
||||
for (size_t i = 0; i < ALEN(conf.fonts); i++) {
|
||||
tll_foreach(conf.fonts[i], it)
|
||||
config_font_destroy(&it->item);
|
||||
tll_free(conf.fonts[i]);
|
||||
}
|
||||
tll_foreach(conf_fonts, it)
|
||||
tll_push_back(conf.fonts, config_font_parse(it->item));
|
||||
tll_push_back(conf.fonts[0], config_font_parse(it->item));
|
||||
tll_free(conf_fonts);
|
||||
}
|
||||
if (conf_width > 0 && conf_height > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue