Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package fcft for openSUSE:Factory checked in 
at 2025-03-17 22:19:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/fcft (Old)
 and      /work/SRC/openSUSE:Factory/.fcft.new.19136 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "fcft"

Mon Mar 17 22:19:14 2025 rev:23 rq:1253873 version:3.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/fcft/fcft.changes        2025-03-06 
14:49:34.731578716 +0100
+++ /work/SRC/openSUSE:Factory/.fcft.new.19136/fcft.changes     2025-03-17 
22:23:10.704482331 +0100
@@ -1,0 +2,19 @@
+Thu Mar 13 17:44:21 UTC 2025 - Arnav Singh <opens...@arnavion.dev>
+
+- Updated to 3.3.1:
+  * Fixed binary incompatibility with 3.2 and earlier.
+
+-------------------------------------------------------------------
+Wed Mar 12 08:58:28 UTC 2025 - Arnav Singh <opens...@arnavion.dev>
+
+- Updated to 3.3.0:
+  * Added scaling_filter to fcft_font_options. The default value is
+    FCFT_SCALING_FILTER_CUBIC.
+  * Added new scaling filters: impulse, box, linear, gaussian, lanczos3
+    and lanczos3_stretched.
+  * When scaling bitmap fonts (not emoji fonts), do not apply a scaling filter.
+    In earlier versions, fcft applied a bilinear scaling filter.
+  * Deprecated fcft_set_scaling_filter;
+    use fcft_font_options::scaling_filter instead.
+
+-------------------------------------------------------------------

Old:
----
  fcft-3.2.0.tar.gz
  fcft-3.2.0.tar.gz.sig

New:
----
  fcft-3.3.1.tar.gz
  fcft-3.3.1.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fcft.spec ++++++
--- /var/tmp/diff_new_pack.3CeYVx/_old  2025-03-17 22:23:11.204503256 +0100
+++ /var/tmp/diff_new_pack.3CeYVx/_new  2025-03-17 22:23:11.204503256 +0100
@@ -18,7 +18,7 @@
 
 %define libname libfcft4
 Name:           fcft
-Version:        3.2.0
+Version:        3.3.1
 Release:        0
 Summary:        A library for font loading and glyph rasterization using 
FreeType/pixman
 License:        MIT

++++++ fcft-3.2.0.tar.gz -> fcft-3.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/CHANGELOG.md new/fcft-3.3.1/CHANGELOG.md
--- old/fcft-3.2.0/CHANGELOG.md 2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/CHANGELOG.md 2025-03-13 13:17:15.000000000 +0100
@@ -1,5 +1,7 @@
 # Changelog
 
+* [3.3.1](#3-3-1)
+* [3.3.0](#3-3-0)
 * [3.2.0](#3-2-0)
 * [3.1.10](#3-1-10)
 * [3.1.9](#3-1-9)
@@ -43,6 +45,38 @@
 * [1.1.7](#1-1-7)
 
 
+## 3.3.1
+
+### Fixed
+
+* Regression: binary incompatibility with fcft <= 3.2, in
+  `fcft_set_scaling_filter()` ([#1992][foot-1992]).
+
+[foot-1992]: https://codeberg.org/dnkl/foot/issues/1992
+
+
+## 3.3.0
+
+### Added
+
+* `scaling_filter` to `fcft_font_options`. The default value is
+  `FCFT_SCALING_FILTER_CUBIC`.
+* New scaling filters: impulse, box, linear, gaussian, lanczos3 and
+  lanczos3_stretched.
+
+
+### Changed
+
+* When scaling bitmap fonts (not emoji fonts), do not apply a scaling
+  filter. In earlier versions, fcft applied a bilinear scaling filter.
+
+
+### Deprecated
+
+* `fcft_set_scaling_filter()`; use `fcft_font_options::scaling_filter`
+  instead.
+
+
 ## 3.2.0
 
 ### Added
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/PKGBUILD new/fcft-3.3.1/PKGBUILD
--- old/fcft-3.2.0/PKGBUILD     2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/PKGBUILD     2025-03-13 13:17:15.000000000 +0100
@@ -1,5 +1,5 @@
 pkgname=fcft
-pkgver=3.2.0
+pkgver=3.3.1
 pkgrel=1
 pkgdesc="Simple font loading and glyph rasterization library"
 changelog=CHANGELOG.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_capabilities.3.scd 
new/fcft-3.3.1/doc/fcft_capabilities.3.scd
--- old/fcft-3.2.0/doc/fcft_capabilities.3.scd  2025-03-05 14:07:37.000000000 
+0100
+++ new/fcft-3.3.1/doc/fcft_capabilities.3.scd  2025-03-13 13:17:15.000000000 
+0100
@@ -1,4 +1,4 @@
-fcft_capabilities(3) "3.2.0" "fcft"
+fcft_capabilities(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_clone.3.scd 
new/fcft-3.3.1/doc/fcft_clone.3.scd
--- old/fcft-3.2.0/doc/fcft_clone.3.scd 2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_clone.3.scd 2025-03-13 13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_clone(3) "3.2.0" "fcft"
+fcft_clone(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_destroy.3.scd 
new/fcft-3.3.1/doc/fcft_destroy.3.scd
--- old/fcft-3.2.0/doc/fcft_destroy.3.scd       2025-03-05 14:07:37.000000000 
+0100
+++ new/fcft-3.3.1/doc/fcft_destroy.3.scd       2025-03-13 13:17:15.000000000 
+0100
@@ -1,4 +1,4 @@
-fcft_destroy(3) "3.2.0" "fcft"
+fcft_destroy(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_fini.3.scd 
new/fcft-3.3.1/doc/fcft_fini.3.scd
--- old/fcft-3.2.0/doc/fcft_fini.3.scd  2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_fini.3.scd  2025-03-13 13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_fini(3) "3.2.0" "fcft"
+fcft_fini(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_font_options_create.3.scd 
new/fcft-3.3.1/doc/fcft_font_options_create.3.scd
--- old/fcft-3.2.0/doc/fcft_font_options_create.3.scd   2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_font_options_create.3.scd   2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_font_options_create(3) "3.2.0" "fcft"
+fcft_font_options_create(3) "3.3.1" "fcft"
 
 # NAME
 
@@ -24,17 +24,45 @@
 
 ```
 struct fcft_font_options {
+    enum fcft_scaling_filter scaling_filter;
     enum fcft_emoji_presentation emoji_presentation;
 
     struct {
         bool srgb_decode;
         pixman_format_code_t format;
     } color_glyphs;
-
-    uint32_t reserved;
 };
 ```
 
+# SCALING FILTER
+
+Configures the filter the use when downscaling bitmap fonts (typically
+emoji fonts).
+
+Possible values are:
+
+- *FCFT\_SCALING\_FILTER\_NONE*
+- *FCFT\_SCALING\_FILTER\_NEAREST*
+- *FCFT\_SCALING\_FILTER\_BILINEAR*
+- *FCFT\_SCALING\_FILTER\_IMPULSE*
+- *FCFT\_SCALING\_FILTER\_BOX*
+- *FCFT\_SCALING\_FILTER\_LINEAR*
+- *FCFT\_SCALING\_FILTER\_CUBIC*
+- *FCFT\_SCALING\_FILTER\_GAUSSIAN*
+- *FCFT\_SCALING\_FILTER\_LANCZOS2*
+- *FCFT\_SCALING\_FILTER\_LANCZOS3*
+- *FCFT\_SCALING\_FILTER\_LANCZOS3\_STRETCHED*
+
+*FCFT\_SCALING\_FILTER\_NONE* disables filtering.
+
+*FCFT\_SCALING\_FILTER\_NEAREST* and
+*FCFT\_SCALING\_FILTER\_BILINEAR* are traditional filters, with
+_nearest_ being the fastest.
+
+The rest are separable convolution filters.
+
+The default is *FCFT\_SCALING\_FILTER\_CUBIC*.
+
 # EMOJI PRESENTATION
 
 _emoji\_presentation_ configures the default presentation style to use
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_font_options_destroy.3.scd 
new/fcft-3.3.1/doc/fcft_font_options_destroy.3.scd
--- old/fcft-3.2.0/doc/fcft_font_options_destroy.3.scd  2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_font_options_destroy.3.scd  2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_font_options_destroy(3) "3.2.0" "fcft"
+fcft_font_options_destroy(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_from_name.3.scd 
new/fcft-3.3.1/doc/fcft_from_name.3.scd
--- old/fcft-3.2.0/doc/fcft_from_name.3.scd     2025-03-05 14:07:37.000000000 
+0100
+++ new/fcft-3.3.1/doc/fcft_from_name.3.scd     2025-03-13 13:17:15.000000000 
+0100
@@ -1,4 +1,4 @@
-fcft_from_name(3) "3.2.0" "fcft"
+fcft_from_name(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_from_name2.3.scd 
new/fcft-3.3.1/doc/fcft_from_name2.3.scd
--- old/fcft-3.2.0/doc/fcft_from_name2.3.scd    2025-03-05 14:07:37.000000000 
+0100
+++ new/fcft-3.3.1/doc/fcft_from_name2.3.scd    2025-03-13 13:17:15.000000000 
+0100
@@ -1,4 +1,4 @@
-fcft_from_name(3) "3.2.0" "fcft"
+fcft_from_name(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_init.3.scd 
new/fcft-3.3.1/doc/fcft_init.3.scd
--- old/fcft-3.2.0/doc/fcft_init.3.scd  2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_init.3.scd  2025-03-13 13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_init(3) "3.2.0" "fcft"
+fcft_init(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_kerning.3.scd 
new/fcft-3.3.1/doc/fcft_kerning.3.scd
--- old/fcft-3.2.0/doc/fcft_kerning.3.scd       2025-03-05 14:07:37.000000000 
+0100
+++ new/fcft-3.3.1/doc/fcft_kerning.3.scd       2025-03-13 13:17:15.000000000 
+0100
@@ -1,4 +1,4 @@
-fcft_kerning(3) "3.2.0" "fcft"
+fcft_kerning(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_log_init.3.scd 
new/fcft-3.3.1/doc/fcft_log_init.3.scd
--- old/fcft-3.2.0/doc/fcft_log_init.3.scd      2025-03-05 14:07:37.000000000 
+0100
+++ new/fcft-3.3.1/doc/fcft_log_init.3.scd      2025-03-13 13:17:15.000000000 
+0100
@@ -1,4 +1,4 @@
-fcft_log_init(3) "3.2.0" "fcft"
+fcft_log_init(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_precompose.3.scd 
new/fcft-3.3.1/doc/fcft_precompose.3.scd
--- old/fcft-3.2.0/doc/fcft_precompose.3.scd    2025-03-05 14:07:37.000000000 
+0100
+++ new/fcft-3.3.1/doc/fcft_precompose.3.scd    2025-03-13 13:17:15.000000000 
+0100
@@ -1,4 +1,4 @@
-fcft_precompose(3) "3.2.0" "fcft"
+fcft_precompose(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_rasterize_char_utf32.3.scd 
new/fcft-3.3.1/doc/fcft_rasterize_char_utf32.3.scd
--- old/fcft-3.2.0/doc/fcft_rasterize_char_utf32.3.scd  2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_rasterize_char_utf32.3.scd  2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_rasterize_char_utf32(3) "3.2.0" "fcft"
+fcft_rasterize_char_utf32(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_rasterize_grapheme_utf32.3.scd 
new/fcft-3.3.1/doc/fcft_rasterize_grapheme_utf32.3.scd
--- old/fcft-3.2.0/doc/fcft_rasterize_grapheme_utf32.3.scd      2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_rasterize_grapheme_utf32.3.scd      2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_rasterize_grapheme_utf32(3) "3.2.0" "fcft"
+fcft_rasterize_grapheme_utf32(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_rasterize_text_run_utf32.3.scd 
new/fcft-3.3.1/doc/fcft_rasterize_text_run_utf32.3.scd
--- old/fcft-3.2.0/doc/fcft_rasterize_text_run_utf32.3.scd      2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_rasterize_text_run_utf32.3.scd      2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_rasterize_text_run_utf32(3) "3.2.0" "fcft"
+fcft_rasterize_text_run_utf32(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_set_emoji_presentation.3.scd 
new/fcft-3.3.1/doc/fcft_set_emoji_presentation.3.scd
--- old/fcft-3.2.0/doc/fcft_set_emoji_presentation.3.scd        2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_set_emoji_presentation.3.scd        2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_set_emoji_presentation(3) "3.2.0" "fcft"
+fcft_set_emoji_presentation(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_set_scaling_filter.3.scd 
new/fcft-3.3.1/doc/fcft_set_scaling_filter.3.scd
--- old/fcft-3.2.0/doc/fcft_set_scaling_filter.3.scd    2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_set_scaling_filter.3.scd    2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_set_scaling_filter(3) "3.2.0" "fcft"
+fcft_set_scaling_filter(3) "3.3.1" "fcft"
 
 # NAME
 
@@ -24,8 +24,14 @@
 - *FCFT\_SCALING\_FILTER\_NONE*
 - *FCFT\_SCALING\_FILTER\_NEAREST*
 - *FCFT\_SCALING\_FILTER\_BILINEAR*
+- *FCFT\_SCALING\_FILTER\_IMPULSE*
+- *FCFT\_SCALING\_FILTER\_BOX*
+- *FCFT\_SCALING\_FILTER\_LINEAR*
 - *FCFT\_SCALING\_FILTER\_CUBIC*
+- *FCFT\_SCALING\_FILTER\_GAUSSIAN*
+- *FCFT\_SCALING\_FILTER\_LANCZOS2*
 - *FCFT\_SCALING\_FILTER\_LANCZOS3*
+- *FCFT\_SCALING\_FILTER\_LANCZOS3\_STRETCHED*
 
 *FCFT\_SCALING\_FILTER\_NONE* disables filtering.
 
@@ -33,11 +39,7 @@
 *FCFT\_SCALING\_FILTER\_BILINEAR* are traditional filters, with
 _nearest_ being the fastest.
 
-*FCFT\_SCALING\_FILTER\_CUBIC* and
-*FCFT\_SCALING\_FILTER\_LANCZOS3* are both examples of separable
-convolution filters. _Cubic_ is faster than _lanczos3_, but with
-slightly worse result. However, both produce much better looking glyphs
-than _nearest_.
+The rest are separable convolution filters.
 
 If this function is not called, fcft defaults to
 *FCFT\_SCALING\_FILTER\_CUBIC*.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/doc/fcft_text_run_destroy.3.scd 
new/fcft-3.3.1/doc/fcft_text_run_destroy.3.scd
--- old/fcft-3.2.0/doc/fcft_text_run_destroy.3.scd      2025-03-05 
14:07:37.000000000 +0100
+++ new/fcft-3.3.1/doc/fcft_text_run_destroy.3.scd      2025-03-13 
13:17:15.000000000 +0100
@@ -1,4 +1,4 @@
-fcft_text_run_destroy(3) "3.2.0" "fcft"
+fcft_text_run_destroy(3) "3.3.1" "fcft"
 
 # NAME
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/example/main.c 
new/fcft-3.3.1/example/main.c
--- old/fcft-3.2.0/example/main.c       2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/example/main.c       2025-03-13 13:17:15.000000000 +0100
@@ -57,6 +57,8 @@
 
 static pixman_color_t fg = {0x0000, 0x0000, 0x0000, 0xffff};
 static pixman_color_t bg = {0xffff, 0xffff, 0xffff, 0xffff};
+static enum fcft_scaling_filter scaling_filter = FCFT_SCALING_FILTER_CUBIC;
+static enum fcft_emoji_presentation emoji_presentation = 
FCFT_EMOJI_PRESENTATION_DEFAULT;
 
 static int width;
 static int height;
@@ -395,9 +397,11 @@
         "\n"
         "Options:\n"
         "  -t,--text=TEXT            text string to render\n"
-        "  -f,--font=FONTS           comma separated list of FontConfig 
formatted font specifications\n"
-        "  -b,--background=RRGGBBAA  background color (e.g. ff000077 for 
semi-transparent red)\n"
-        "  -c,--foreground=RRGGBBAA  foreground color (e.g. 00ff00ff for 
non-transparent green)\n"
+        "  -f,--font=FONTS               comma separated list of FontConfig 
formatted font specifications\n"
+        "  -b,--background=RRGGBBAA      background color (e.g. ff000077 for 
semi-transparent red)\n"
+        "  -c,--foreground=RRGGBBAA      foreground color (e.g. 00ff00ff for 
non-transparent green)\n"
+        "  -s,--scaling-filter=FILT      pixman scaling filter to use when 
scaling color glyphs\n"
+        "  -e,--emoji-presentation=PRES  default emoji presentation\n"
         "  -h,--help                 show usage\n",
         name);
 }
@@ -428,6 +432,8 @@
         {"font",       required_argument, NULL, 'f'},
         {"background", required_argument, NULL, 'b'},
         {"foreground", required_argument, NULL, 'c'},
+        {"scaling-filter", required_argument, NULL, 's'},
+        {"emoji-presentation", required_argument, NULL, 'e'},
         {NULL,         no_argument,       NULL, '\0'},
     };
 
@@ -435,7 +441,7 @@
     const char *font_list = "serif:size=24";
 
     while (true) {
-        int c = getopt_long(argc, argv, "+t:f:b:c:h", options, NULL);
+        int c = getopt_long(argc, argv, "+t:f:b:c:s:e:h", options, NULL);
         if (c < 0)
             break;
 
@@ -474,6 +480,56 @@
             break;
         }
 
+        case 's':
+            if (strcmp(optarg, "none") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_NONE;
+            else if (strcmp(optarg, "nearest") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_NEAREST;
+            else if (strcmp(optarg, "bilinear") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_BILINEAR;
+            else if (strcmp(optarg, "impulse") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_IMPULSE;
+            else if (strcmp(optarg, "box") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_BOX;
+            else if (strcmp(optarg, "linear") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_LINEAR;
+            else if (strcmp(optarg, "cubic") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_CUBIC;
+            else if (strcmp(optarg, "gaussian") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_GAUSSIAN;
+            else if (strcmp(optarg, "lanczos2") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_LANCZOS2;
+            else if (strcmp(optarg, "lanczos3") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_LANCZOS3;
+            else if (strcmp(optarg, "lanczos3-stretched") == 0)
+                scaling_filter = FCFT_SCALING_FILTER_LANCZOS3_STRETCHED;
+            else {
+                fprintf(
+                    stderr,
+                    "%s: invalid scaling-filter, not one of 'none', "
+                    "'nearest', 'bilinear', 'impulse', 'box', 'linear', "
+                    "'cubic', 'gaussian', 'lanczos2', 'lanczos3', or "
+                    "'lanczos3-stretched'\n", optarg);
+                return EXIT_FAILURE;
+            }
+            break;
+
+        case 'e':
+            if (strcmp(optarg, "default") == 0)
+                emoji_presentation = FCFT_EMOJI_PRESENTATION_DEFAULT;
+            else if (strcmp(optarg, "text") == 0)
+                emoji_presentation = FCFT_EMOJI_PRESENTATION_TEXT;
+            else if (strcmp(optarg, "emoji") == 0)
+                emoji_presentation = FCFT_EMOJI_PRESENTATION_EMOJI;
+            else {
+                fprintf(
+                    stderr,
+                    "%s: invalid emoji-presentation, not one of 'default', "
+                    "'text' or 'emoji'\n", optarg);
+                return EXIT_FAILURE;
+            }
+            break;
+
         case 'h':
             usage(prog_name);
             return EXIT_SUCCESS;
@@ -573,6 +629,9 @@
         struct fcft_font_options *options = fcft_font_options_create();
         /* Optionally set custom options */
 
+        options->scaling_filter = scaling_filter;
+        options->emoji_presentation = emoji_presentation;
+
         font = fcft_from_name2(tll_length(font_names), names, NULL, options);
         assert(font != NULL);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/fcft/fcft.h new/fcft-3.3.1/fcft/fcft.h
--- old/fcft-3.2.0/fcft/fcft.h  2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/fcft/fcft.h  2025-03-13 13:17:15.000000000 +0100
@@ -158,17 +158,36 @@
                          bool *comb_is_from_primary,
                          bool *composed_is_from_primary);
 
+#if defined(__has_attribute)
+ #define FCFT_DEPRECATED __attribute__((deprecated))
+#else
+ #define FCFT_DEPRECATED
+#endif
+
 enum fcft_scaling_filter {
     FCFT_SCALING_FILTER_NONE,
     FCFT_SCALING_FILTER_NEAREST,
     FCFT_SCALING_FILTER_BILINEAR,
+
+    /*
+     * Separable convolution filters
+     */
+
     FCFT_SCALING_FILTER_CUBIC,
     FCFT_SCALING_FILTER_LANCZOS3,
+
+    /* Added in 3.3.0 */
+    FCFT_SCALING_FILTER_IMPULSE,
+    FCFT_SCALING_FILTER_BOX,
+    FCFT_SCALING_FILTER_LINEAR,
+    FCFT_SCALING_FILTER_GAUSSIAN,
+    FCFT_SCALING_FILTER_LANCZOS2,
+    FCFT_SCALING_FILTER_LANCZOS3_STRETCHED,
 };
 
 /* Note: this function does not clear any caches - call *before*
  * rasterizing any glyphs! */
-bool fcft_set_scaling_filter(enum fcft_scaling_filter filter);
+bool fcft_set_scaling_filter(enum fcft_scaling_filter filter) FCFT_DEPRECATED;
 
 /*
  * Emoji presentation
@@ -194,12 +213,6 @@
     FCFT_EMOJI_PRESENTATION_EMOJI,
 };
 
-#if defined(__has_attribute)
- #define FCFT_DEPRECATED __attribute__((deprecated))
-#else
- #define FCFT_DEPRECATED
-#endif
-
 
 /* TODO: remove */
 void fcft_set_emoji_presentation(
@@ -215,7 +228,7 @@
         pixman_format_code_t format;
     } color_glyphs;
 
-    uint32_t reserved;
+    enum fcft_scaling_filter scaling_filter;
 };
 
 struct fcft_font_options *fcft_font_options_create(void);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/fcft.c new/fcft-3.3.1/fcft.c
--- old/fcft-3.2.0/fcft.c       2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/fcft.c       2025-03-13 13:17:15.000000000 +0100
@@ -53,7 +53,10 @@
 static FT_Library ft_lib = NULL;
 static mtx_t ft_lock;
 static bool can_set_lcd_filter = false;
-static enum fcft_scaling_filter scaling_filter = FCFT_SCALING_FILTER_CUBIC;
+
+/* fcft_set_scaling_filter() is deprecated; -1 means use the per-font
+   scaling filter */
+static enum fcft_scaling_filter scaling_filter = -1;
 
 static const size_t glyph_cache_initial_size = 256;
 #if defined(FCFT_HAVE_HARFBUZZ)
@@ -393,8 +396,14 @@
     case FCFT_SCALING_FILTER_NONE:
     case FCFT_SCALING_FILTER_NEAREST:
     case FCFT_SCALING_FILTER_BILINEAR:
+    case FCFT_SCALING_FILTER_IMPULSE:
+    case FCFT_SCALING_FILTER_BOX:
+    case FCFT_SCALING_FILTER_LINEAR:
     case FCFT_SCALING_FILTER_CUBIC:
+    case FCFT_SCALING_FILTER_GAUSSIAN:
+    case FCFT_SCALING_FILTER_LANCZOS2:
     case FCFT_SCALING_FILTER_LANCZOS3:
+    case FCFT_SCALING_FILTER_LANCZOS3_STRETCHED:
         scaling_filter = filter;
         return true;
     }
@@ -927,13 +936,12 @@
 }
 
 static const struct fcft_font_options default_font_options = {
+    .scaling_filter = FCFT_SCALING_FILTER_CUBIC,
     .emoji_presentation = FCFT_EMOJI_PRESENTATION_DEFAULT,
     .color_glyphs = {
         .srgb_decode = false,
         .format = PIXMAN_a8r8g8b8,
     },
-
-    .reserved = 0,
 };
 
 FCFT_EXPORT struct fcft_font_options *
@@ -1634,8 +1642,10 @@
         pixman_image_set_transform(pix, &_scale);
 
         const enum fcft_scaling_filter filter_to_use = inst->is_color
-            ? scaling_filter
-            : FCFT_SCALING_FILTER_BILINEAR;
+            ? (scaling_filter != (enum fcft_scaling_filter)-1
+                ? scaling_filter
+                : options->scaling_filter)
+            : FCFT_SCALING_FILTER_NONE;
 
         switch (filter_to_use) {
         case FCFT_SCALING_FILTER_NONE:
@@ -1649,16 +1659,33 @@
             pixman_image_set_filter(pix, PIXMAN_FILTER_BILINEAR, NULL, 0);
             break;
 
+        case FCFT_SCALING_FILTER_IMPULSE:
+        case FCFT_SCALING_FILTER_BOX:
+        case FCFT_SCALING_FILTER_LINEAR:
         case FCFT_SCALING_FILTER_CUBIC:
-        case FCFT_SCALING_FILTER_LANCZOS3: {
+        case FCFT_SCALING_FILTER_GAUSSIAN:
+        case FCFT_SCALING_FILTER_LANCZOS2:
+        case FCFT_SCALING_FILTER_LANCZOS3:
+        case FCFT_SCALING_FILTER_LANCZOS3_STRETCHED: {
             /*
              * TODO:
              *   - find out how the subsample_bit_{x,y} parameters should be 
set
              */
             int param_count = 0;
-            pixman_kernel_t kernel = filter_to_use == FCFT_SCALING_FILTER_CUBIC
-                ? PIXMAN_KERNEL_CUBIC
-                : PIXMAN_KERNEL_LANCZOS3;
+            pixman_kernel_t kernel;
+
+            switch (filter_to_use) {
+            case FCFT_SCALING_FILTER_IMPULSE: kernel = PIXMAN_KERNEL_IMPULSE; 
break;
+            case FCFT_SCALING_FILTER_BOX: kernel = PIXMAN_KERNEL_BOX; break;
+            case FCFT_SCALING_FILTER_LINEAR: kernel = PIXMAN_KERNEL_LINEAR; 
break;
+            case FCFT_SCALING_FILTER_CUBIC: kernel = PIXMAN_KERNEL_CUBIC; 
break;
+            case FCFT_SCALING_FILTER_GAUSSIAN: kernel = 
PIXMAN_KERNEL_GAUSSIAN; break;
+            case FCFT_SCALING_FILTER_LANCZOS2: kernel = 
PIXMAN_KERNEL_LANCZOS2; break;
+            case FCFT_SCALING_FILTER_LANCZOS3: kernel = 
PIXMAN_KERNEL_LANCZOS3; break;
+            case FCFT_SCALING_FILTER_LANCZOS3_STRETCHED:  kernel = 
PIXMAN_KERNEL_LANCZOS3_STRETCHED; break;
+
+            default: assert(false); kernel = PIXMAN_KERNEL_CUBIC; break;
+            }
 
             pixman_fixed_t *params = 
pixman_filter_create_separable_convolution(
                 &param_count,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/meson.build new/fcft-3.3.1/meson.build
--- old/fcft-3.2.0/meson.build  2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/meson.build  2025-03-13 13:17:15.000000000 +0100
@@ -1,5 +1,5 @@
 project('fcft', 'c',
-        version: '3.2.0',  # Don't forget to update version in man pages
+        version: '3.3.1',  # Don't forget to update version in man pages
         license: 'MIT',
         meson_version: '>=0.58.0',
         default_options: [
@@ -19,8 +19,8 @@
 # SONAME, and thus actual linking.
 so_version = [
   '4',      # MAJOR: increment on non-backward compatible ABI changes
-  '2',      # MINOR: increment with backward compatible ABI changes
-  '0',      # PATCH: increment with non-ABI affecting changes
+  '3',      # MINOR: increment with backward compatible ABI changes
+  '1',      # PATCH: increment with non-ABI affecting changes
 ]
 
 is_debug_build = get_option('buildtype').startswith('debug')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fcft-3.2.0/test.c new/fcft-3.3.1/test.c
--- old/fcft-3.2.0/test.c       2025-03-05 14:07:37.000000000 +0100
+++ new/fcft-3.3.1/test.c       2025-03-13 13:17:15.000000000 +0100
@@ -94,18 +94,6 @@
 }
 END_TEST
 
-START_TEST(test_set_scaling_filter)
-{
-    ck_assert(fcft_set_scaling_filter(FCFT_SCALING_FILTER_NONE));
-    ck_assert(fcft_set_scaling_filter(FCFT_SCALING_FILTER_NEAREST));
-    ck_assert(fcft_set_scaling_filter(FCFT_SCALING_FILTER_BILINEAR));
-    ck_assert(fcft_set_scaling_filter(FCFT_SCALING_FILTER_CUBIC));
-    ck_assert(fcft_set_scaling_filter(FCFT_SCALING_FILTER_LANCZOS3));
-
-    ck_assert(!fcft_set_scaling_filter(FCFT_SCALING_FILTER_LANCZOS3 + 120));
-}
-END_TEST
-
 #if defined(FCFT_HAVE_HARFBUZZ)
 
 static struct fcft_font *emoji_font = NULL;
@@ -158,7 +146,6 @@
     tcase_add_test(core, test_from_name);
     tcase_add_test(core, test_glyph_rasterize);
     tcase_add_test(core, test_precompose);
-    tcase_add_test(core, test_set_scaling_filter);
     suite_add_tcase(suite, core);
 
 #if defined(FCFT_HAVE_HARFBUZZ)

Reply via email to