[arch-commits] Commit in freetype2/repos (14 files)

Evangelos Foutras foutrelis at gemini.archlinux.org
Tue Sep 21 21:54:29 UTC 2021


    Date: Tuesday, September 21, 2021 @ 21:54:29
  Author: foutrelis
Revision: 424501

archrelease: copy trunk to testing-x86_64

Added:
  freetype2/repos/testing-x86_64/
  freetype2/repos/testing-x86_64/0001-Enable-table-validation-modules.patch
    (from rev 424500, freetype2/trunk/0001-Enable-table-validation-modules.patch)
  freetype2/repos/testing-x86_64/0002-Enable-subpixel-rendering.patch
    (from rev 424500, freetype2/trunk/0002-Enable-subpixel-rendering.patch)
  freetype2/repos/testing-x86_64/0003-Enable-infinality-subpixel-hinting.patch
    (from rev 424500, freetype2/trunk/0003-Enable-infinality-subpixel-hinting.patch)
  freetype2/repos/testing-x86_64/0004-Enable-long-PCF-family-names.patch
    (from rev 424500, freetype2/trunk/0004-Enable-long-PCF-family-names.patch)
  freetype2/repos/testing-x86_64/0005-ft2-demos-meson-fixes.patch
    (from rev 424500, freetype2/trunk/0005-ft2-demos-meson-fixes.patch)
  freetype2/repos/testing-x86_64/0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch
    (from rev 424500, freetype2/trunk/0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch)
  freetype2/repos/testing-x86_64/0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch
    (from rev 424500, freetype2/trunk/0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch)
  freetype2/repos/testing-x86_64/0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch
    (from rev 424500, freetype2/trunk/0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch)
  freetype2/repos/testing-x86_64/0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch
    (from rev 424500, freetype2/trunk/0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch)
  freetype2/repos/testing-x86_64/0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch
    (from rev 424500, freetype2/trunk/0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch)
  freetype2/repos/testing-x86_64/PKGBUILD
    (from rev 424500, freetype2/trunk/PKGBUILD)
  freetype2/repos/testing-x86_64/freetype2.install
    (from rev 424500, freetype2/trunk/freetype2.install)
  freetype2/repos/testing-x86_64/freetype2.sh
    (from rev 424500, freetype2/trunk/freetype2.sh)

-----------------------------------------------------------------+
 0001-Enable-table-validation-modules.patch                      |   42 
 0002-Enable-subpixel-rendering.patch                            |   22 
 0003-Enable-infinality-subpixel-hinting.patch                   |   24 
 0004-Enable-long-PCF-family-names.patch                         |   22 
 0005-ft2-demos-meson-fixes.patch                                |  150 +++
 0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch       |   35 
 0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch       |   41 
 0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch  |  474 ++++++++++
 0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch |   23 
 0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch          |   55 +
 PKGBUILD                                                        |  122 ++
 freetype2.install                                               |    8 
 freetype2.sh                                                    |   12 
 13 files changed, 1030 insertions(+)

Copied: freetype2/repos/testing-x86_64/0001-Enable-table-validation-modules.patch (from rev 424500, freetype2/trunk/0001-Enable-table-validation-modules.patch)
===================================================================
--- testing-x86_64/0001-Enable-table-validation-modules.patch	                        (rev 0)
+++ testing-x86_64/0001-Enable-table-validation-modules.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,42 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 23 Jun 2015 08:40:29 +0200
+Subject: [PATCH] Enable table validation modules
+
+---
+ modules.cfg | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules.cfg b/modules.cfg
+index 30f7fac45a..a9a4703989 100644
+--- a/modules.cfg
++++ b/modules.cfg
+@@ -114,26 +114,26 @@ AUX_MODULES += cache
+ 
+ # TrueType GX/AAT table validation.  Needs `ftgxval.c' below.
+ #
+-# AUX_MODULES += gxvalid
++AUX_MODULES += gxvalid
+ 
+ # Support for streams compressed with gzip (files with suffix .gz).
+ #
+ # See include/freetype/ftgzip.h for the API.
+ AUX_MODULES += gzip
+ 
+ # Support for streams compressed with LZW (files with suffix .Z).
+ #
+ # See include/freetype/ftlzw.h for the API.
+ AUX_MODULES += lzw
+ 
+ # Support for streams compressed with bzip2 (files with suffix .bz2).
+ #
+ # See include/freetype/ftbzip2.h for the API.
+ AUX_MODULES += bzip2
+ 
+ # OpenType table validation.  Needs `ftotval.c' below.
+ #
+-# AUX_MODULES += otvalid
++AUX_MODULES += otvalid
+ 
+ # Auxiliary PostScript driver component to share common code.
+ #

Copied: freetype2/repos/testing-x86_64/0002-Enable-subpixel-rendering.patch (from rev 424500, freetype2/trunk/0002-Enable-subpixel-rendering.patch)
===================================================================
--- testing-x86_64/0002-Enable-subpixel-rendering.patch	                        (rev 0)
+++ testing-x86_64/0002-Enable-subpixel-rendering.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,22 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 23 Jun 2015 08:43:07 +0200
+Subject: [PATCH] Enable subpixel rendering
+
+---
+ include/freetype/config/ftoption.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+index 4227fd376e..32da3fa039 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -123,7 +123,7 @@ FT_BEGIN_HEADER
+    * When this macro is not defined, FreeType offers alternative LCD
+    * rendering technology that produces excellent output.
+    */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ 
+ 
+   /**************************************************************************

Copied: freetype2/repos/testing-x86_64/0003-Enable-infinality-subpixel-hinting.patch (from rev 424500, freetype2/trunk/0003-Enable-infinality-subpixel-hinting.patch)
===================================================================
--- testing-x86_64/0003-Enable-infinality-subpixel-hinting.patch	                        (rev 0)
+++ testing-x86_64/0003-Enable-infinality-subpixel-hinting.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Mon, 29 Aug 2016 08:43:10 +0200
+Subject: [PATCH] Enable infinality subpixel hinting
+
+---
+ include/freetype/config/ftoption.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+index 32da3fa039..0dd4021e24 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -688,8 +688,8 @@ FT_BEGIN_HEADER
+    * https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
+    */
+ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  1         */
+-#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2
+-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 ) */
++/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING  2         */
++#define TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )
+ 
+ 
+   /**************************************************************************

Copied: freetype2/repos/testing-x86_64/0004-Enable-long-PCF-family-names.patch (from rev 424500, freetype2/trunk/0004-Enable-long-PCF-family-names.patch)
===================================================================
--- testing-x86_64/0004-Enable-long-PCF-family-names.patch	                        (rev 0)
+++ testing-x86_64/0004-Enable-long-PCF-family-names.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,22 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Sun, 14 May 2017 18:09:31 +0200
+Subject: [PATCH] Enable long PCF family names
+
+---
+ include/freetype/config/ftoption.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+index 0dd4021e24..8da3073b6d 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -877,7 +877,7 @@ FT_BEGIN_HEADER
+    * If this option is activated, it can be controlled with the
+    * `no-long-family-names` property of the 'pcf' driver module.
+    */
+-/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+ 
+ 
+   /*************************************************************************/

Copied: freetype2/repos/testing-x86_64/0005-ft2-demos-meson-fixes.patch (from rev 424500, freetype2/trunk/0005-ft2-demos-meson-fixes.patch)
===================================================================
--- testing-x86_64/0005-ft2-demos-meson-fixes.patch	                        (rev 0)
+++ testing-x86_64/0005-ft2-demos-meson-fixes.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,150 @@
+diff --git a/meson.build b/meson.build
+index fc2d29f9e86551ebb332876d50950e0935b87bce..c425afea09016c6334231bd3e426d605f05fd329 100644
+--- a/meson.build
++++ b/meson.build
+@@ -76,25 +76,8 @@ ftcommon_lib = static_library('ftcommon',
+   link_with: [common_lib, graph_lib],
+ )
+ 
+-executable('fttimer',
+-  'src/fttimer.c',
+-  dependencies: libfreetype2_dep,
+-  install: false)
+-
+-executable('ftchkwd',
+-  'src/ftchkwd.c',
+-  dependencies: libfreetype2_dep,
+-  install: false)
+ 
+-executable('ftmemchk',
+-  'src/ftmemchk.c',
+-  dependencies: libfreetype2_dep,
+-  install: false)
+-
+-executable('ftpatchk',
+-  'src/ftpatchk.c',
+-  dependencies: libfreetype2_dep,
+-  install: false)
++# programs
+ 
+ executable('ftbench',
+   'src/ftbench.c',
+@@ -102,17 +85,10 @@ executable('ftbench',
+   link_with: common_lib,
+   install: true)
+ 
+-executable('ftdump',
+-  'src/ftdump.c',
+-  dependencies: libfreetype2_dep,
+-  link_with: [common_lib, output_lib],
+-  install: true)
+-
+-executable('ftlint',
+-  'src/ftlint.c',
++executable('ftchkwd',
++  'src/ftchkwd.c',
+   dependencies: libfreetype2_dep,
+-  link_with: common_lib,
+-  install: true)
++  install: false)
+ 
+ executable('ftdiff',
+   'src/ftdiff.c',
+@@ -121,6 +97,12 @@ executable('ftdiff',
+   link_with: ftcommon_lib,
+   install: true)
+ 
++executable('ftdump',
++  'src/ftdump.c',
++  dependencies: libfreetype2_dep,
++  link_with: [common_lib, output_lib],
++  install: true)
++
+ executable('ftgamma',
+   'src/ftgamma.c',
+   dependencies: [libfreetype2_dep, math_dep],
+@@ -135,6 +117,17 @@ executable('ftgrid',
+   link_with: [ftcommon_lib, output_lib],
+   install: true)
+ 
++executable('ftlint',
++  'src/ftlint.c',
++  dependencies: libfreetype2_dep,
++  link_with: common_lib,
++  install: true)
++
++executable('ftmemchk',
++  'src/ftmemchk.c',
++  dependencies: libfreetype2_dep,
++  install: false)
++
+ executable('ftmulti',
+   'src/ftmulti.c',
+   dependencies: libfreetype2_dep,
+@@ -142,6 +135,11 @@ executable('ftmulti',
+   link_with: ftcommon_lib,
+   install: true)
+ 
++executable('ftpatchk',
++  'src/ftpatchk.c',
++  dependencies: libfreetype2_dep,
++  install: false)
++
+ executable('ftsdf',
+   'src/ftsdf.c',
+   dependencies: libfreetype2_dep,
+@@ -156,12 +154,10 @@ executable('ftstring',
+   link_with: ftcommon_lib,
+   install: true)
+ 
+-executable('ftview',
+-  'src/ftview.c',
++executable('fttimer',
++  'src/fttimer.c',
+   dependencies: libfreetype2_dep,
+-  include_directories: graph_include_dir,
+-  link_with: ftcommon_lib,
+-  install: true)
++  install: false)
+ 
+ executable('ftvalid',
+   'src/ftvalid.c',
+@@ -169,6 +165,14 @@ executable('ftvalid',
+   link_with: common_lib,
+   install: true)
+ 
++executable('ftview',
++  'src/ftview.c',
++  dependencies: libfreetype2_dep,
++  include_directories: graph_include_dir,
++  link_with: ftcommon_lib,
++  install: true)
++
++
+ install_man([
+   'man/ftbench.1',
+   'man/ftdiff.1',
+diff --git a/meson.build b/meson.build
+index c425afea09016c6334231bd3e426d605f05fd329..36d0309ed75c5e3a3cfa79276800832e2e9eae7c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -172,6 +172,19 @@ executable('ftview',
+   link_with: ftcommon_lib,
+   install: true)
+ 
++# This program only works if FreeType has been compiled with enabled option
++# `TT_CONFIG_OPTION_BYTECODE_INTERPRETER` (which is the default).
++#
++# We need a path into FreeType's `src/truetype` directory.  This is
++# something normal applications should never need.
++executable('ttdebug',
++  'src/ttdebug.c',
++  dependencies: libfreetype2_dep,
++  c_args: '-DFT2_BUILD_LIBRARY=1',
++  include_directories: 'subprojects/freetype2/src/truetype',
++  link_with: common_lib,
++  install: true)
++
+ 
+ install_man([
+   'man/ftbench.1',

Copied: freetype2/repos/testing-x86_64/0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch (from rev 424500, freetype2/trunk/0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch)
===================================================================
--- testing-x86_64/0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch	                        (rev 0)
+++ testing-x86_64/0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,35 @@
+From d7f649f283763af099256eb2d5e326df601c3e76 Mon Sep 17 00:00:00 2001
+From: Anuj Verma <anujv at iitbhilai.ac.in>
+Date: Mon, 16 Aug 2021 07:48:09 +0530
+Subject: [PATCH] [sdf] Return `FT_Err_Ok` while trying to render bitmap.
+
+  * src/sdf/ftsdfrend.c (ft_bsdf_render): Return OK if the slot is
+  a bitmap and the render mode is anything other than `FT_RENDER_MODE_SDF`.
+  This is for compatibility reasons.
+
+  Fixes issue #1076
+---
+ src/sdf/ftsdfrend.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/sdf/ftsdfrend.c b/src/sdf/ftsdfrend.c
+index 30f2e62a4..5686c0bf5 100644
+--- a/src/sdf/ftsdfrend.c
++++ b/src/sdf/ftsdfrend.c
+@@ -502,8 +502,11 @@
+     /* check whether render mode is correct */
+     if ( mode != FT_RENDER_MODE_SDF )
+     {
+-      error = FT_THROW( Cannot_Render_Glyph );
+-      goto Exit;
++      FT_TRACE0(( "ft_bsdf_render: trying to render bitmap\n" ));
++
++      /* return OK since the slot is already a bitmap */
++      error = FT_Err_Ok;
++      return error;
+     }
+ 
+     if ( origin )
+-- 
+GitLab
+

Copied: freetype2/repos/testing-x86_64/0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch (from rev 424500, freetype2/trunk/0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch)
===================================================================
--- testing-x86_64/0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch	                        (rev 0)
+++ testing-x86_64/0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,41 @@
+From 6e9d8d314ff6ab23177b9162c0b96616460bb84e Mon Sep 17 00:00:00 2001
+From: Alexei Podtelezhnikov <apodtele at gmail.com>
+Date: Fri, 20 Aug 2021 16:01:32 -0400
+Subject: [PATCH] [base] Restore quiet no-op rendering of bitmap glyphs.
+
+Fixes #1076.
+
+* src/base/ftobjs.c (FT_Render_Glyph_Internal): Discard an error when
+rendering a bitmap glyph.
+---
+ src/base/ftobjs.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
+index 342ac4a27..7b40c6421 100644
+--- a/src/base/ftobjs.c
++++ b/src/base/ftobjs.c
+@@ -4703,7 +4703,7 @@
+         else
+           renderer = FT_Lookup_Renderer( library, slot->format, &node );
+ 
+-        error = FT_ERR( Unimplemented_Feature );
++        error = FT_ERR( Cannot_Render_Glyph );
+         while ( renderer )
+         {
+           error = renderer->render( renderer, slot, render_mode, NULL );
+@@ -4719,6 +4719,11 @@
+           /* format.                                               */
+           renderer = FT_Lookup_Renderer( library, slot->format, &node );
+         }
++
++        /* it is not an error if we cannot render a bitmat glyph */
++        if ( FT_ERR_EQ( error, Cannot_Render_Glyph ) &&
++             slot->format == FT_GLYPH_FORMAT_BITMAP  )
++          error = FT_Err_Ok;
+       }
+     }
+ 
+-- 
+GitLab
+

Copied: freetype2/repos/testing-x86_64/0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch (from rev 424500, freetype2/trunk/0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch)
===================================================================
--- testing-x86_64/0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch	                        (rev 0)
+++ testing-x86_64/0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,474 @@
+From 47cf8ebf4a78ed42da455a98d77a92ce6a180d78 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <drott at chromium.org>
+Date: Wed, 28 Jul 2021 17:36:57 +0300
+Subject: [PATCH] [sfnt] Add API for retrieving a 'COLR' v1 'ClipBox' table.
+
+The optional 'COLR' v1 glyph-specific clip box helps upstream graphics
+libraries allocate a sufficiently large bitmap for a glyph without having to
+traverse the glyph graph for that.  See
+
+  https://github.com/googlefonts/colr-gradients-spec/issues/251
+
+for background on the introduction of this specification change.
+
+* include/freetype/ftcolor.h (FT_ClipBox): New structure.
+(FT_Get_Color_Glyph_ClipBox): New function declaration.
+
+* include/freetype/internal/sfnt.h (TT_Get_Color_Glyph_ClipBox_Func):
+New function type.
+(SFNT_Interface, FT_DEFINE_SFNT_INTERFACE): Use it.
+
+* src/base/ftobjs.c (FT_Get_Color_Glyph_ClipBox): New function to link API
+with SFNT implementation.
+
+* src/sfnt/sfdriver.c (sfnt_interface): Updated.
+* src/sfnt/ttcolr.c (Colr): New field `clip_list`.
+(tt_face_load_colr): Parse global clip list offset.
+(tt_face_get_color_glyph_clipbox): New function to find the clip box for a
+glyph id from the clip list array.
+* src/sfnt/ttcolr.h: Updated.
+---
+ include/freetype/ftcolor.h       |  86 +++++++++++++++++++++
+ include/freetype/internal/sfnt.h |  63 +++++++++++++---
+ src/base/ftobjs.c                |  29 +++++++
+ src/sfnt/sfdriver.c              |  10 ++-
+ src/sfnt/ttcolr.c                | 125 ++++++++++++++++++++++++++++++-
+ src/sfnt/ttcolr.h                |   5 ++
+ 6 files changed, 302 insertions(+), 16 deletions(-)
+
+diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h
+index a4bd62a26..b98289917 100644
+--- a/include/freetype/ftcolor.h
++++ b/include/freetype/ftcolor.h
+@@ -1383,6 +1383,49 @@ FT_BEGIN_HEADER
+   } FT_Color_Root_Transform;
+ 
+ 
++  /**************************************************************************
++   *
++   * @struct:
++   *   FT_ClipBox
++   *
++   * @description:
++   *   A structure representing a 'COLR' v1 'ClipBox' table.  'COLR' v1
++   *   glyphs may optionally define a clip box for aiding allocation or
++   *   defining a maximum drawable region.  Use @FT_Get_Color_Glyph_ClipBox
++   *   to retrieve it.
++   *
++   * @fields:
++   *   bottom_left ::
++   *     The bottom left corner of the clip box as an @FT_Vector with
++   *     fixed-point coordinates in 26.6 format.
++   *
++   *   top_left ::
++   *     The top left corner of the clip box as an @FT_Vector with
++   *     fixed-point coordinates in 26.6 format.
++   *
++   *   top_right ::
++   *     The top right corner of the clip box as an @FT_Vector with
++   *     fixed-point coordinates in 26.6 format.
++   *
++   *   bottom_right ::
++   *     The bottom right corner of the clip box as an @FT_Vector with
++   *     fixed-point coordinates in 26.6 format.
++   *
++   * @since:
++   *   2.12 -- **currently experimental only!**  There might be changes
++   *   without retaining backward compatibility of both the API and ABI.
++   *
++   */
++  typedef struct  FT_ClipBox_
++  {
++    FT_Vector  bottom_left;
++    FT_Vector  top_left;
++    FT_Vector  top_right;
++    FT_Vector  bottom_right;
++
++  } FT_ClipBox;
++
++
+   /**************************************************************************
+    *
+    * @function:
+@@ -1475,6 +1518,49 @@ FT_BEGIN_HEADER
+                             FT_OpaquePaint*          paint );
+ 
+ 
++  /**************************************************************************
++   *
++   * @function:
++   *   FT_Get_Color_Glyph_ClipBox
++   *
++   * @description:
++   *   Search for a 'COLR' v1 clip box for the specified `base_glyph` and
++   *   fill the `clip_box` parameter with the 'COLR' v1 'ClipBox' information
++   *   if one is found.
++   *
++   * @input:
++   *   face ::
++   *     A handle to the parent face object.
++   *
++   *   base_glyph ::
++   *     The glyph index for which to retrieve the clip box.
++   *
++   * @output:
++   *   clip_box ::
++   *     The clip box for the requested `base_glyph` if one is found.  The
++   *     clip box is computed taking scale and transformations configured on
++   *     the @FT_Face into account.  @FT_ClipBox contains @FT_Vector values
++   *     in 26.6 format.
++   *
++   * @return:
++   *   Value~1 if a clip box is found.  If no clip box is found or an error
++   *   occured, value~0 is returned.
++   *
++   * @note:
++   *   To retrieve the clip box in font units, reset scale to units-per-em
++   *   and remove transforms configured using @FT_Set_Transform.
++   *
++   * @since:
++   *   2.12 -- **currently experimental only!**  There might be changes
++   *   without retaining backward compatibility of both the API and ABI.
++   *
++   */
++  FT_EXPORT( FT_Bool )
++  FT_Get_Color_Glyph_ClipBox( FT_Face      face,
++                              FT_UInt      base_glyph,
++                              FT_ClipBox*  clip_box );
++
++
+   /**************************************************************************
+    *
+    * @function:
+diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
+index 438ec897e..e8d77e232 100644
+--- a/include/freetype/internal/sfnt.h
++++ b/include/freetype/internal/sfnt.h
+@@ -555,6 +555,44 @@ FT_BEGIN_HEADER
+                                       FT_OpaquePaint           *paint );
+ 
+ 
++  /**************************************************************************
++   *
++   * @functype:
++   *   TT_Get_Color_Glyph_ClipBox_Func
++   *
++   * @description:
++   *   Search for a 'COLR' v1 clip box for the specified `base_glyph` and
++   *   fill the `clip_box` parameter with the 'COLR' v1 'ClipBox' information
++   *   if one is found.
++   *
++   * @input:
++   *   face ::
++   *     A handle to the parent face object.
++   *
++   *   base_glyph ::
++   *     The glyph index for which to retrieve the clip box.
++   *
++   * @output:
++   *   clip_box ::
++   *     The clip box for the requested base_glyph if one is found.  The clip
++   *     box is computed taking scale and transformations configured on the
++   *     @FT_Face into account.  @FT_ClipBox contains @FT_Vector values in
++   *     26.6 format.
++   *
++   * @note:
++   *     To retrieve the clip box in font units, reset scale to units-per-em
++   *     and remove transforms configured using @FT_Set_Transform.
++   *
++   * @return:
++   *   Value~1 if a ClipBox is found.  If no clip box is found or an
++   *   error occured, value~0 is returned.
++   */
++  typedef FT_Bool
++  ( *TT_Get_Color_Glyph_ClipBox_Func )( TT_Face      face,
++                                        FT_UInt      base_glyph,
++                                        FT_ClipBox*  clip_box );
++
++
+   /**************************************************************************
+    *
+    * @functype:
+@@ -890,17 +928,18 @@ FT_BEGIN_HEADER
+     TT_Set_SBit_Strike_Func      set_sbit_strike;
+     TT_Load_Strike_Metrics_Func  load_strike_metrics;
+ 
+-    TT_Load_Table_Func             load_cpal;
+-    TT_Load_Table_Func             load_colr;
+-    TT_Free_Table_Func             free_cpal;
+-    TT_Free_Table_Func             free_colr;
+-    TT_Set_Palette_Func            set_palette;
+-    TT_Get_Colr_Layer_Func         get_colr_layer;
+-    TT_Get_Color_Glyph_Paint_Func  get_colr_glyph_paint;
+-    TT_Get_Paint_Layers_Func       get_paint_layers;
+-    TT_Get_Colorline_Stops_Func    get_colorline_stops;
+-    TT_Get_Paint_Func              get_paint;
+-    TT_Blend_Colr_Func             colr_blend;
++    TT_Load_Table_Func               load_cpal;
++    TT_Load_Table_Func               load_colr;
++    TT_Free_Table_Func               free_cpal;
++    TT_Free_Table_Func               free_colr;
++    TT_Set_Palette_Func              set_palette;
++    TT_Get_Colr_Layer_Func           get_colr_layer;
++    TT_Get_Color_Glyph_Paint_Func    get_colr_glyph_paint;
++    TT_Get_Color_Glyph_ClipBox_Func  get_color_glyph_clipbox;
++    TT_Get_Paint_Layers_Func         get_paint_layers;
++    TT_Get_Colorline_Stops_Func      get_colorline_stops;
++    TT_Get_Paint_Func                get_paint;
++    TT_Blend_Colr_Func               colr_blend;
+ 
+     TT_Get_Metrics_Func  get_metrics;
+ 
+@@ -951,6 +990,7 @@ FT_BEGIN_HEADER
+           set_palette_,                  \
+           get_colr_layer_,               \
+           get_colr_glyph_paint_,         \
++          get_color_glyph_clipbox,       \
+           get_paint_layers_,             \
+           get_colorline_stops_,          \
+           get_paint_,                    \
+@@ -995,6 +1035,7 @@ FT_BEGIN_HEADER
+     set_palette_,                        \
+     get_colr_layer_,                     \
+     get_colr_glyph_paint_,               \
++    get_color_glyph_clipbox,             \
+     get_paint_layers_,                   \
+     get_colorline_stops_,                \
+     get_paint_,                          \
+diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
+index 0ded2440f..5c1a4d034 100644
+--- a/src/base/ftobjs.c
++++ b/src/base/ftobjs.c
+@@ -5639,6 +5639,35 @@
+   }
+ 
+ 
++  /* documentation is in ftcolor.h */
++
++  FT_EXPORT_DEF( FT_Bool )
++  FT_Get_Color_Glyph_ClipBox( FT_Face      face,
++                              FT_UInt      base_glyph,
++                              FT_ClipBox*  clip_box )
++  {
++    TT_Face       ttface;
++    SFNT_Service  sfnt;
++
++
++    if ( !face || !clip_box )
++      return 0;
++
++    if ( !FT_IS_SFNT( face ) )
++      return 0;
++
++    ttface = (TT_Face)face;
++    sfnt   = (SFNT_Service)ttface->sfnt;
++
++    if ( sfnt->get_color_glyph_clipbox )
++      return sfnt->get_color_glyph_clipbox( ttface,
++                                            base_glyph,
++                                            clip_box );
++    else
++      return 0;
++  }
++
++
+   /* documentation is in freetype.h */
+ 
+   FT_EXPORT_DEF( FT_Bool )
+diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
+index 824e709fa..d1d01c99e 100644
+--- a/src/sfnt/sfdriver.c
++++ b/src/sfnt/sfdriver.c
+@@ -1292,13 +1292,15 @@
+                             /* TT_Get_Colr_Layer_Func  get_colr_layer  */
+ 
+     PUT_COLOR_LAYERS_V1( tt_face_get_colr_glyph_paint ),
+-                 /* TT_Get_Colr_Glyph_Paint_Func  get_colr_glyph_paint */
++              /* TT_Get_Color_Glyph_Paint_Func    get_colr_glyph_paint */
++    PUT_COLOR_LAYERS_V1( tt_face_get_color_glyph_clipbox ),
++              /* TT_Get_Color_Glyph_ClipBox_Func  get_clipbox          */
+     PUT_COLOR_LAYERS_V1( tt_face_get_paint_layers ),
+-                 /* TT_Get_Paint_Layers_Func      get_paint_layers     */
++              /* TT_Get_Paint_Layers_Func         get_paint_layers     */
+     PUT_COLOR_LAYERS_V1( tt_face_get_colorline_stops ),
+-                 /* TT_Get_Paint                  get_paint            */
++              /* TT_Get_Paint                     get_paint            */
+     PUT_COLOR_LAYERS_V1( tt_face_get_paint ),
+-                 /* TT_Get_Colorline_Stops_Func   get_colorline_stops  */
++              /* TT_Get_Colorline_Stops_Func      get_colorline_stops  */
+ 
+     PUT_COLOR_LAYERS( tt_face_colr_blend_layer ),
+                             /* TT_Blend_Colr_Func      colr_blend      */
+diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
+index b8f4777ed..2f3e8846d 100644
+--- a/src/sfnt/ttcolr.c
++++ b/src/sfnt/ttcolr.c
+@@ -94,6 +94,8 @@
+     FT_ULong  num_layers_v1;
+     FT_Byte*  layers_v1;
+ 
++    FT_Byte*  clip_list;
++
+     /*
+      * Paint tables start at the minimum of the end of the LayerList and the
+      * end of the BaseGlyphList.  Record this location in a field here for
+@@ -134,7 +136,7 @@
+ 
+     FT_ULong  base_glyph_offset, layer_offset;
+     FT_ULong  base_glyphs_offset_v1, num_base_glyphs_v1;
+-    FT_ULong  layer_offset_v1, num_layers_v1;
++    FT_ULong  layer_offset_v1, num_layers_v1, clip_list_offset;
+     FT_ULong  table_size;
+ 
+ 
+@@ -226,6 +228,16 @@
+           colr->base_glyphs_v1 +
+           colr->num_base_glyphs_v1 * BASE_GLYPH_PAINT_RECORD_SIZE;
+       }
++
++      clip_list_offset = FT_NEXT_ULONG( p );
++
++      if ( clip_list_offset >= table_size )
++        goto InvalidTable;
++
++      if ( clip_list_offset )
++        colr->clip_list = (FT_Byte*)( table + clip_list_offset );
++      else
++        colr->clip_list = 0;
+     }
+ 
+     colr->base_glyphs = (FT_Byte*)( table + base_glyph_offset );
+@@ -796,6 +808,117 @@
+   }
+ 
+ 
++  FT_LOCAL_DEF( FT_Bool )
++  tt_face_get_color_glyph_clipbox( TT_Face      face,
++                                   FT_UInt      base_glyph,
++                                   FT_ClipBox*  clip_box )
++  {
++    Colr*  colr;
++
++    FT_Byte  *p, *p1, *clip_base;
++
++    FT_Byte    clip_list_format;
++    FT_ULong   num_clip_boxes, i;
++    FT_UShort  gid_start, gid_end;
++    FT_UInt32  clip_box_offset;
++    FT_Byte    format;
++
++    const FT_Byte  num_corners = 4;
++    FT_Vector      corners[4];
++    FT_Byte        j;
++    FT_BBox        font_clip_box;
++
++
++    colr = (Colr*)face->colr;
++    if ( !colr )
++      return 0;
++
++    if ( !colr->clip_list )
++      return 0;
++
++    p = colr->clip_list;
++
++    clip_base        = p;
++    clip_list_format = FT_NEXT_BYTE ( p );
++
++    /* Format byte used here to be able to upgrade ClipList for >16bit */
++    /* glyph ids; for now we can expect it to be 0. */
++    if ( !( clip_list_format == 0 ) )
++      return 0;
++
++    num_clip_boxes = FT_NEXT_ULONG( p );
++
++    for ( i = 0; i < num_clip_boxes; ++i )
++    {
++      gid_start       = FT_NEXT_USHORT( p );
++      gid_end         = FT_NEXT_USHORT( p );
++      clip_box_offset = FT_NEXT_UOFF3( p );
++
++      if ( base_glyph >= gid_start && base_glyph <= gid_end )
++      {
++        p1 = (FT_Byte*)( clip_base + clip_box_offset );
++
++        if ( p1 >= ( (FT_Byte*)colr->table + colr->table_size ) )
++          return 0;
++
++        format = FT_NEXT_BYTE( p1 );
++
++        if ( format < 0 || format > 1 )
++          return 0;
++
++        /* `face->root.size->metrics.x_scale` and `y_scale` are factors   */
++        /* that scale a font unit value in integers to a 26.6 fixed value */
++        /* according to the requested size, see for example               */
++        /* `ft_recompute_scaled_metrics`.                                 */
++        font_clip_box.xMin = FT_MulFix( FT_NEXT_SHORT( p1 ),
++                                        face->root.size->metrics.x_scale );
++        font_clip_box.yMin = FT_MulFix( FT_NEXT_SHORT( p1 ),
++                                        face->root.size->metrics.x_scale );
++        font_clip_box.xMax = FT_MulFix( FT_NEXT_SHORT( p1 ),
++                                        face->root.size->metrics.x_scale );
++        font_clip_box.yMax = FT_MulFix( FT_NEXT_SHORT( p1 ),
++                                        face->root.size->metrics.x_scale );
++
++        /* Make 4 corner points (xMin, yMin), (xMax, yMax) and transform */
++        /* them.  If we we would only transform two corner points and    */
++        /* span a rectangle based on those, the rectangle may become too */
++        /* small to cover the glyph.                                     */
++        corners[0].x = font_clip_box.xMin;
++        corners[1].x = font_clip_box.xMin;
++        corners[2].x = font_clip_box.xMax;
++        corners[3].x = font_clip_box.xMax;
++
++        corners[0].y = font_clip_box.yMin;
++        corners[1].y = font_clip_box.yMax;
++        corners[2].y = font_clip_box.yMax;
++        corners[3].y = font_clip_box.yMin;
++
++        for ( j = 0; j < num_corners; ++j )
++        {
++          if ( face->root.internal->transform_flags & 1 )
++            FT_Vector_Transform( &corners[j],
++                                 &face->root.internal->transform_matrix );
++
++          if ( face->root.internal->transform_flags & 2 )
++          {
++            corners[j].x += face->root.internal->transform_delta.x;
++            corners[j].y += face->root.internal->transform_delta.y;
++          }
++        }
++
++        clip_box->bottom_left  = corners[0];
++        clip_box->top_left     = corners[1];
++        clip_box->top_right    = corners[2];
++        clip_box->bottom_right = corners[3];
++
++        return 1;
++      }
++    }
++
++    return 0;
++  }
++
++
+   FT_LOCAL_DEF( FT_Bool )
+   tt_face_get_paint_layers( TT_Face            face,
+                             FT_LayerIterator*  iterator,
+diff --git a/src/sfnt/ttcolr.h b/src/sfnt/ttcolr.h
+index c91d2b172..b81e4cb95 100644
+--- a/src/sfnt/ttcolr.h
++++ b/src/sfnt/ttcolr.h
+@@ -48,6 +48,11 @@ FT_BEGIN_HEADER
+                                 FT_Color_Root_Transform  root_transform,
+                                 FT_OpaquePaint*          paint );
+ 
++  FT_LOCAL( FT_Bool )
++  tt_face_get_color_glyph_clipbox( TT_Face      face,
++                                   FT_UInt      base_glyph,
++                                   FT_ClipBox*  clip_box );
++
+   FT_LOCAL( FT_Bool )
+   tt_face_get_paint_layers( TT_Face            face,
+                             FT_LayerIterator*  iterator,

Copied: freetype2/repos/testing-x86_64/0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch (from rev 424500, freetype2/trunk/0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch)
===================================================================
--- testing-x86_64/0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch	                        (rev 0)
+++ testing-x86_64/0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,23 @@
+From fed5521016227bf8cc4475f66450a9963568d162 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl at gnu.org>
+Date: Mon, 9 Aug 2021 19:27:34 +0200
+Subject: [PATCH] * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Minor
+ fix.
+
+---
+ src/sfnt/ttcolr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
+index 2f3e8846d..68807127f 100644
+--- a/src/sfnt/ttcolr.c
++++ b/src/sfnt/ttcolr.c
+@@ -863,7 +863,7 @@
+ 
+         format = FT_NEXT_BYTE( p1 );
+ 
+-        if ( format < 0 || format > 1 )
++        if ( format > 1 )
+           return 0;
+ 
+         /* `face->root.size->metrics.x_scale` and `y_scale` are factors   */

Copied: freetype2/repos/testing-x86_64/0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch (from rev 424500, freetype2/trunk/0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch)
===================================================================
--- testing-x86_64/0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch	                        (rev 0)
+++ testing-x86_64/0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,55 @@
+From e40ae7569aa4ef591f66ff9066df2f91de75bb77 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dominik=20R=C3=B6ttsches?= <drott at chromium.org>
+Date: Mon, 9 Aug 2021 13:44:55 +0300
+Subject: [PATCH] [sfnt] Add missing blend mode 'plus' to 'COLR' v1.
+
+* include/freetype/ftcolor.h (FT_Composite_Mode): Add missing blend mode
+'plus' after it was added to the spec.
+---
+ include/freetype/ftcolor.h | 33 +++++++++++++++++----------------
+ 1 file changed, 17 insertions(+), 16 deletions(-)
+
+diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h
+index b98289917..cbd2d85bb 100644
+--- a/include/freetype/ftcolor.h
++++ b/include/freetype/ftcolor.h
+@@ -740,22 +740,23 @@ FT_BEGIN_HEADER
+     FT_COLR_COMPOSITE_SRC_ATOP       = 9,
+     FT_COLR_COMPOSITE_DEST_ATOP      = 10,
+     FT_COLR_COMPOSITE_XOR            = 11,
+-    FT_COLR_COMPOSITE_SCREEN         = 12,
+-    FT_COLR_COMPOSITE_OVERLAY        = 13,
+-    FT_COLR_COMPOSITE_DARKEN         = 14,
+-    FT_COLR_COMPOSITE_LIGHTEN        = 15,
+-    FT_COLR_COMPOSITE_COLOR_DODGE    = 16,
+-    FT_COLR_COMPOSITE_COLOR_BURN     = 17,
+-    FT_COLR_COMPOSITE_HARD_LIGHT     = 18,
+-    FT_COLR_COMPOSITE_SOFT_LIGHT     = 19,
+-    FT_COLR_COMPOSITE_DIFFERENCE     = 20,
+-    FT_COLR_COMPOSITE_EXCLUSION      = 21,
+-    FT_COLR_COMPOSITE_MULTIPLY       = 22,
+-    FT_COLR_COMPOSITE_HSL_HUE        = 23,
+-    FT_COLR_COMPOSITE_HSL_SATURATION = 24,
+-    FT_COLR_COMPOSITE_HSL_COLOR      = 25,
+-    FT_COLR_COMPOSITE_HSL_LUMINOSITY = 26,
+-    FT_COLR_COMPOSITE_MAX            = 27
++    FT_COLR_COMPOSITE_PLUS           = 12,
++    FT_COLR_COMPOSITE_SCREEN         = 13,
++    FT_COLR_COMPOSITE_OVERLAY        = 14,
++    FT_COLR_COMPOSITE_DARKEN         = 15,
++    FT_COLR_COMPOSITE_LIGHTEN        = 16,
++    FT_COLR_COMPOSITE_COLOR_DODGE    = 17,
++    FT_COLR_COMPOSITE_COLOR_BURN     = 18,
++    FT_COLR_COMPOSITE_HARD_LIGHT     = 19,
++    FT_COLR_COMPOSITE_SOFT_LIGHT     = 20,
++    FT_COLR_COMPOSITE_DIFFERENCE     = 21,
++    FT_COLR_COMPOSITE_EXCLUSION      = 22,
++    FT_COLR_COMPOSITE_MULTIPLY       = 23,
++    FT_COLR_COMPOSITE_HSL_HUE        = 24,
++    FT_COLR_COMPOSITE_HSL_SATURATION = 25,
++    FT_COLR_COMPOSITE_HSL_COLOR      = 26,
++    FT_COLR_COMPOSITE_HSL_LUMINOSITY = 27,
++    FT_COLR_COMPOSITE_MAX            = 28
+ 
+   } FT_Composite_Mode;
+ 

Copied: freetype2/repos/testing-x86_64/PKGBUILD (from rev 424500, freetype2/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,122 @@
+# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgbase=freetype2
+pkgname=(freetype2 freetype2-demos freetype2-docs)
+pkgver=2.11.0
+pkgrel=4
+pkgdesc="Font rasterization library"
+url="https://www.freetype.org/"
+arch=(x86_64)
+license=(GPL)
+# adding harfbuzz for improved OpenType features auto-hinting
+# introduces a cycle dep to harfbuzz depending on freetype wanted by upstream
+depends=(zlib bzip2 sh libpng harfbuzz brotli)
+makedepends=(libx11 qt5-base meson)
+source=(https://download-mirror.savannah.gnu.org/releases/freetype/freetype-$pkgver.tar.xz{,.sig}
+        https://download-mirror.savannah.gnu.org/releases/freetype/freetype-doc-$pkgver.tar.xz{,.sig}
+        https://download-mirror.savannah.gnu.org/releases/freetype/ft2demos-$pkgver.tar.xz{,.sig}
+        0001-Enable-table-validation-modules.patch
+        0002-Enable-subpixel-rendering.patch
+        0003-Enable-infinality-subpixel-hinting.patch
+        0004-Enable-long-PCF-family-names.patch
+        0005-ft2-demos-meson-fixes.patch
+        0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch
+        0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch
+        0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch
+        0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch
+        0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch
+        freetype2.sh)
+sha256sums=('8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7'
+            'SKIP'
+            '5b0b5f504f3547ab6123049917b36cfe6944837eaa7baa86ae742a596b5c206c'
+            'SKIP'
+            'eb0622296c6dfb38fc305c99ebbfb5c770db7e344b94f63042ec03f3db164550'
+            'SKIP'
+            'e606bdba5c0ee698902886140e4643551ffc8327b1b7d2b0c9129d1f93b1f36c'
+            '17ab1609cdbcaba3c5975f5cf1ffd078e067d560f906d5507390d41997e6c468'
+            '561d2f2503d180b796f868470612610f6d7fcb34efa0620ecab38fd39002e27a'
+            '9c068a984e7b9a27ff9e709839d522b66815ac4e8c7a5bd4ea0224335f7f2ef6'
+            '7b1268c229414bc75c50fa826a0f8d391c15568742bca10afd8c12f0c61e5597'
+            '2b13b8cc9acc3e56be6b0f8102d648864227bf93637bc956d5052c77c8509782'
+            '21a2d243bc6b44d1cdb88ef29af2bd5ceda8d0faaf928bdc2c078a474ddc61f1'
+            '13aba5006db13522ff0f3ffc85f81058b6cfcc48671285b1a90ac041a6a51952'
+            '09a01b99839fc864db7a2c0748b4703ac5b04897cbd35e0d8969024b4ba89649'
+            'fbabfb745db32e1d90f9798e1018da26578f3bce9714dac8e64c15b691e76f69'
+            'f7f8e09c44f7552c883846e9a6a1efc50377c4932234e74adc4a8ff750606467')
+validpgpkeys=(58E0C111E39F5408C5D3EC76C1A60EACE707FDA5) # Werner Lemberg <wl at gnu.org>
+
+prepare() {
+  pushd freetype-$pkgver
+  patch -Np1 -i ../0001-Enable-table-validation-modules.patch
+  patch -Np1 -i ../0002-Enable-subpixel-rendering.patch
+  patch -Np1 -i ../0003-Enable-infinality-subpixel-hinting.patch
+  patch -Np1 -i ../0004-Enable-long-PCF-family-names.patch
+  # https://gitlab.freedesktop.org/freetype/freetype/-/issues/1076
+  patch -Np1 -i ../0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch
+  patch -Np1 -i ../0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch
+
+  # Add API for retrieving a 'COLR' v1 'ClipBox' table (used by Chromium 94)
+  patch -Np1 -i ../0008-sfnt-Add-API-for-retrieving-a-COLR-v1-ClipBox-table.patch
+  patch -Np1 -i ../0009-src-sfnt-ttcolr.c-tt_face_get_color_glyph_clipbox-Mi.patch
+  patch -Np1 -i ../0010-sfnt-Add-missing-blend-mode-plus-to-COLR-v1.patch
+
+  ln -sr . ../ft2demos-$pkgver/subprojects/freetype2
+  popd
+
+  pushd ft2demos-$pkgver
+  patch -Np1 -i ../0005-ft2-demos-meson-fixes.patch
+  popd
+}
+
+build() {
+  arch-meson ft2demos-$pkgver build \
+    -D freetype2:default_library=shared
+  meson compile -C build
+}
+
+check() {
+  meson test -C build --print-errorlogs
+}
+
+_pick() {
+  local p="$1" f d; shift
+  for f; do
+    d="$srcdir/$p/${f#$pkgdir/}"
+    mkdir -p "$(dirname "$d")"
+    mv "$f" "$d"
+    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
+  done
+}
+
+package_freetype2() {
+  provides=(libfreetype.so)
+  install=freetype2.install
+  backup=(etc/profile.d/freetype2.sh)
+
+  meson install -C build --destdir="$pkgdir"
+  install -Dt "$pkgdir/etc/profile.d" -m644 freetype2.sh
+  install -Dt "$pkgdir/usr/share/aclocal" -m644 \
+    freetype-$pkgver/builds/unix/freetype2.m4
+
+  cd "$pkgdir"
+  _pick demos usr/bin
+  _pick demos usr/share/man/man1
+}
+
+package_freetype2-demos() {
+  pkgdesc="Freetype tools and demos"
+  depends=(freetype2 libx11)
+  optdepends=('qt5-base: ftinspect')
+  mv demos/* "$pkgdir"
+}
+
+package_freetype2-docs() {
+  pkgdesc="Freetype documentation"
+  depends=(freetype2)
+
+  mkdir -p "${pkgdir}/usr/share/doc"
+  cp -r freetype-$pkgver/docs "$pkgdir/usr/share/doc/freetype2"
+}
+
+# vim:set sw=2 et:

Copied: freetype2/repos/testing-x86_64/freetype2.install (from rev 424500, freetype2/trunk/freetype2.install)
===================================================================
--- testing-x86_64/freetype2.install	                        (rev 0)
+++ testing-x86_64/freetype2.install	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,8 @@
+post_upgrade() {
+  if (( $(vercmp $2 2.7-1) < 0 )); then
+    cat <<MSG
+  The Arch-specific FT2_SUBPIXEL_HINTING has been removed.
+  Subpixel hinting is now configured in /etc/profile.d/freetype2.sh .
+MSG
+  fi
+}

Copied: freetype2/repos/testing-x86_64/freetype2.sh (from rev 424500, freetype2/trunk/freetype2.sh)
===================================================================
--- testing-x86_64/freetype2.sh	                        (rev 0)
+++ testing-x86_64/freetype2.sh	2021-09-21 21:54:29 UTC (rev 424501)
@@ -0,0 +1,12 @@
+# Subpixel hinting mode can be chosen by setting the right TrueType interpreter
+# version. The available settings are:
+#
+#     truetype:interpreter-version=35  # Classic mode (default in 2.6)
+#     truetype:interpreter-version=38  # Infinality mode
+#     truetype:interpreter-version=40  # Minimal mode (default in 2.7)
+#
+# There are more properties that can be set, separated by whitespace. Please
+# refer to the FreeType documentation for details.
+
+# Uncomment and configure below
+#export FREETYPE_PROPERTIES="truetype:interpreter-version=40"



More information about the arch-commits mailing list