Date: Tuesday, August 31, 2021 @ 21:14:46
  Author: heftig
Revision: 1010224

2.11.0-3: sync with testing

Added:
  
lib32-freetype2/trunk/0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch
  
lib32-freetype2/trunk/0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch
Modified:
  lib32-freetype2/trunk/PKGBUILD

-----------------------------------------------------------+
 0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch |   35 ++++++++++
 0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch |   41 ++++++++++++
 PKGBUILD                                                  |   14 ++--
 3 files changed, 86 insertions(+), 4 deletions(-)

Added: 0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch
===================================================================
--- 0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch                   
        (rev 0)
+++ 0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch   2021-08-31 
21:14:46 UTC (rev 1010224)
@@ -0,0 +1,35 @@
+From d7f649f283763af099256eb2d5e326df601c3e76 Mon Sep 17 00:00:00 2001
+From: Anuj Verma <an...@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
+

Added: 0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch
===================================================================
--- 0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch                   
        (rev 0)
+++ 0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch   2021-08-31 
21:14:46 UTC (rev 1010224)
@@ -0,0 +1,41 @@
+From 6e9d8d314ff6ab23177b9162c0b96616460bb84e Mon Sep 17 00:00:00 2001
+From: Alexei Podtelezhnikov <apodt...@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
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2021-08-31 20:24:25 UTC (rev 1010223)
+++ PKGBUILD    2021-08-31 21:14:46 UTC (rev 1010224)
@@ -4,7 +4,7 @@
 
 pkgname=lib32-freetype2
 pkgver=2.11.0
-pkgrel=1
+pkgrel=3
 pkgdesc="Font rasterization library (32-bit)"
 url="https://www.freetype.org/";
 arch=(x86_64)
@@ -19,22 +19,28 @@
         0001-Enable-table-validation-modules.patch
         0002-Enable-subpixel-rendering.patch
         0003-Enable-infinality-subpixel-hinting.patch
-        0004-Enable-long-PCF-family-names.patch)
+        0004-Enable-long-PCF-family-names.patch
+        0006-Return_FT_Err_Ok_while_trying_to_render_bitmap.patch
+        0007-Restore_quiet_no-op_rendering_of_bitmap_glyphs.patch)
 sha256sums=('8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48067bde7'
             'SKIP'
             'e606bdba5c0ee698902886140e4643551ffc8327b1b7d2b0c9129d1f93b1f36c'
             '17ab1609cdbcaba3c5975f5cf1ffd078e067d560f906d5507390d41997e6c468'
             '561d2f2503d180b796f868470612610f6d7fcb34efa0620ecab38fd39002e27a'
-            '9c068a984e7b9a27ff9e709839d522b66815ac4e8c7a5bd4ea0224335f7f2ef6')
+            '9c068a984e7b9a27ff9e709839d522b66815ac4e8c7a5bd4ea0224335f7f2ef6'
+            '2b13b8cc9acc3e56be6b0f8102d648864227bf93637bc956d5052c77c8509782'
+            '21a2d243bc6b44d1cdb88ef29af2bd5ceda8d0faaf928bdc2c078a474ddc61f1')
 validpgpkeys=(58E0C111E39F5408C5D3EC76C1A60EACE707FDA5) # Werner Lemberg 
<w...@gnu.org>
 
 prepare() {
   cd 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
 }
 
 build() {

Reply via email to