aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-03-12 09:03:06 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-03-12 09:03:06 +0000
commit7f11ba59efad352b1ff0bb11c0286942ae3d1edb (patch)
treec7a5c315d41c63621a1c38599ad0aefcce732f8c
parentinput: kitty: unittest: don't fail if system has no compose tables (diff)
fcft: require fcft >= 3.3.0, add support for new scaling-filters
Update tweak.scaling-filter to recognize the new scaling filters added in fcft-3.3.0. Since fcft_set_scaling_filter() is deprecated in 3.3.0, don't use it anymore, and set the scaling filter via fcft_font_options instead.
-rw-r--r--CHANGELOG.md2
-rw-r--r--config.c7
-rw-r--r--doc/foot.ini.5.scd5
-rw-r--r--main.c1
-rw-r--r--meson.build2
-rw-r--r--terminal.c1
6 files changed, 12 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b86c826e..0843c29d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -92,7 +92,7 @@
* Auto-detection of URLs (i.e. not OSC-8 based URLs) are now regex
based.
* Rename Tokyo Night Day theme to Tokyo Night Light and update colors.
-* fcft >= 3.2.0 is now required.
+* fcft >= 3.3.0 is now required.
* Linefeed:ing control characters (e.g. `\n`) no longer **clears** a
row's internal linebreak flag. This fixes an issue where
e.g. multi-line prompt input in fish is treated as separate lines,
diff --git a/config.c b/config.c
index 1f287250..b141f564 100644
--- a/config.c
+++ b/config.c
@@ -2677,8 +2677,15 @@ parse_section_tweak(struct context *ctx)
[FCFT_SCALING_FILTER_NONE] = "none",
[FCFT_SCALING_FILTER_NEAREST] = "nearest",
[FCFT_SCALING_FILTER_BILINEAR] = "bilinear",
+
+ [FCFT_SCALING_FILTER_IMPULSE] = "impulse",
+ [FCFT_SCALING_FILTER_BOX] = "box",
+ [FCFT_SCALING_FILTER_LINEAR] = "linear",
[FCFT_SCALING_FILTER_CUBIC] = "cubic",
+ [FCFT_SCALING_FILTER_GAUSSIAN] = "gaussian",
+ [FCFT_SCALING_FILTER_LANCZOS2] = "lanczos2",
[FCFT_SCALING_FILTER_LANCZOS3] = "lanczos3",
+ [FCFT_SCALING_FILTER_LANCZOS3_STRETCHED] = "lanczos3-stretched",
NULL,
};
diff --git a/doc/foot.ini.5.scd b/doc/foot.ini.5.scd
index 952c7ae2..a75ffc6e 100644
--- a/doc/foot.ini.5.scd
+++ b/doc/foot.ini.5.scd
@@ -1716,9 +1716,8 @@ any of these options.
*scaling-filter*
Overrides the default scaling filter used when down-scaling bitmap
fonts (e.g. emoji fonts). Possible values are *none*, *nearest*,
- *bilinear*, *cubic* or *lanczos3*. *cubic* and *lanczos3* produce
- the best results, but are slower (with *lanczos3* being the best
- _and_ slowest).
+ *bilinear*, *impulse*, *box*, *linear*, *cubic* *gaussian*,
+ *lanczos2*, *lanczos3* or *lanczos3-stretched*.
Default: _lanczos3_.
diff --git a/main.c b/main.c
index 1a001186..e7183238 100644
--- a/main.c
+++ b/main.c
@@ -518,7 +518,6 @@ main(int argc, char *const *argv)
(enum fcft_log_colorize)log_colorize,
as_server && log_syslog,
(enum fcft_log_class)log_level);
- fcft_set_scaling_filter(conf.tweak.fcft_filter);
if (conf_server_socket_path != NULL) {
free(conf.server_socket_path);
diff --git a/meson.build b/meson.build
index 6505460f..251e6fde 100644
--- a/meson.build
+++ b/meson.build
@@ -146,7 +146,7 @@ if utf8proc.found()
endif
tllist = dependency('tllist', version: '>=1.1.0', fallback: 'tllist')
-fcft = dependency('fcft', version: ['>=3.2.0', '<4.0.0'], fallback: 'fcft')
+fcft = dependency('fcft', version: ['>=3.3.0', '<4.0.0'], fallback: 'fcft')
wayland_protocols_datadir = wayland_protocols.get_variable('pkgdatadir')
diff --git a/terminal.c b/terminal.c
index 2ba85276..ae1adb1a 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1071,6 +1071,7 @@ reload_fonts(struct terminal *term, bool resize_grid)
struct fcft_font_options *options = fcft_font_options_create();
+ options->scaling_filter = conf->tweak.fcft_filter;
options->color_glyphs.format = PIXMAN_a8r8g8b8;
options->color_glyphs.srgb_decode = render_do_linear_blending(term);