From 35bec848ad486c0cf7d65bda18e71bb2cd7f7891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Desgualdo=20Pereira?= Date: Wed, 22 Oct 2025 16:13:49 -0300 Subject: [PATCH] Add the option to set the screen dpi --- config.def.h | 2 ++ dwlb.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 131a857..4c70253 100644 --- a/config.def.h +++ b/config.def.h @@ -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 diff --git a/dwlb.c b/dwlb.c index faab2d9..f6b71ac 100644 --- a/dwlb.c +++ b/dwlb.c @@ -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)))