From 8e7658a135ae05c790094f2b1b681c7f64f05cf0 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 17 Nov 2020 17:59:31 +0100 Subject: config: add ‘dpi-aware’ option, defaulting to enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When disabled, foot no longers uses outputs’ DPI to scale the font. Instead, it uses the outputs’ scaling factor. That is, instead of appending “:dpi=123” to the fontconfig string, modify the “:pixelsize” or “:size” attribute. Closes #206 --- config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index 3e47179b..4a4a6820 100644 --- a/config.c +++ b/config.c @@ -578,6 +578,9 @@ parse_section_main(const char *key, const char *value, struct config *conf, free(copy); } + else if (strcmp(key, "dpi-aware") == 0) + conf->dpi_aware = str_to_bool(value); + else if (strcmp(key, "workers") == 0) { unsigned long count; if (!str_to_ulong(value, 10, &count)) { @@ -2024,6 +2027,7 @@ config_load(struct config *conf, const char *conf_path, .bell_is_urgent = false, .startup_mode = STARTUP_WINDOWED, .fonts = {tll_init(), tll_init(), tll_init(), tll_init()}, + .dpi_aware = true, /* Use DPI by default, not scale factor */ .scrollback = { .lines = 1000, .indicator = { -- cgit v1.3