mirror of
https://github.com/kolunmi/dwlb.git
synced 2025-10-27 10:14:27 +00:00
Add the option to set the screen dpi
This commit is contained in:
parent
48dbe00bdb
commit
35bec848ad
@ -24,6 +24,8 @@ static bool custom_title = false;
|
|||||||
static bool active_color_title = true;
|
static bool active_color_title = true;
|
||||||
// scale
|
// scale
|
||||||
static uint32_t buffer_scale = 1;
|
static uint32_t buffer_scale = 1;
|
||||||
|
// set dpi
|
||||||
|
static uint32_t dpi_set = 96;
|
||||||
// font
|
// font
|
||||||
static char *fontstr = "monospace:size=16";
|
static char *fontstr = "monospace:size=16";
|
||||||
// tag names
|
// tag names
|
||||||
|
|||||||
2
dwlb.c
2
dwlb.c
@ -1899,7 +1899,7 @@ main(int argc, char **argv)
|
|||||||
fcft_init(FCFT_LOG_COLORIZE_AUTO, 0, FCFT_LOG_CLASS_ERROR);
|
fcft_init(FCFT_LOG_COLORIZE_AUTO, 0, FCFT_LOG_CLASS_ERROR);
|
||||||
fcft_set_scaling_filter(FCFT_SCALING_FILTER_LANCZOS3);
|
fcft_set_scaling_filter(FCFT_SCALING_FILTER_LANCZOS3);
|
||||||
|
|
||||||
unsigned int dpi = 96 * buffer_scale;
|
unsigned int dpi = dpi_set * buffer_scale;
|
||||||
char buf[10];
|
char buf[10];
|
||||||
snprintf(buf, sizeof buf, "dpi=%u", dpi);
|
snprintf(buf, sizeof buf, "dpi=%u", dpi);
|
||||||
if (!(font = fcft_from_name(1, (const char *[]) {fontstr}, buf)))
|
if (!(font = fcft_from_name(1, (const char *[]) {fontstr}, buf)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user