mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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.
This commit is contained in:
parent
cfa178ab25
commit
7f11ba59ef
6 changed files with 12 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
7
config.c
7
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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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_.
|
||||
|
||||
|
|
|
|||
1
main.c
1
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);
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue