Add the option to set horizontal padding

This commit is contained in:
André Desgualdo Pereira 2025-10-22 16:19:24 -03:00
parent 48dbe00bdb
commit 26858d7b62
2 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,8 @@ static bool bottom = false;
static bool hide_vacant = false;
// vertical pixel padding above and below text
static uint32_t vertical_padding = 1;
// horizontal pixel padding of the left and right of each character
static uint32_t horizontal_padding = 0;
// allow in-line color commands in status text
static bool status_commands = true;
// center title text

2
dwlb.c
View File

@ -1904,7 +1904,7 @@ main(int argc, char **argv)
snprintf(buf, sizeof buf, "dpi=%u", dpi);
if (!(font = fcft_from_name(1, (const char *[]) {fontstr}, buf)))
DIE("Could not load font");
textpadding = font->height / 2;
textpadding = (font->height + horizontal_padding) / 2;
height = font->height / buffer_scale + vertical_padding * 2;
/* Configure tag names */