Add the option to set the screen dpi

This commit is contained in:
André Desgualdo Pereira 2025-10-22 16:13:49 -03:00
parent 48dbe00bdb
commit 35bec848ad
2 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,8 @@ static bool custom_title = false;
static bool active_color_title = true;
// scale
static uint32_t buffer_scale = 1;
// set dpi
static uint32_t dpi_set = 96;
// font
static char *fontstr = "monospace:size=16";
// tag names

2
dwlb.c
View File

@ -1899,7 +1899,7 @@ main(int argc, char **argv)
fcft_init(FCFT_LOG_COLORIZE_AUTO, 0, FCFT_LOG_CLASS_ERROR);
fcft_set_scaling_filter(FCFT_SCALING_FILTER_LANCZOS3);
unsigned int dpi = 96 * buffer_scale;
unsigned int dpi = dpi_set * buffer_scale;
char buf[10];
snprintf(buf, sizeof buf, "dpi=%u", dpi);
if (!(font = fcft_from_name(1, (const char *[]) {fontstr}, buf)))