Commit 6e9d8d314ff6ab23177b9162c0b96616460bb84e

Alexei Podtelezhnikov 2021-08-20T16:01:32

[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.

diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 342ac4a..7b40c64 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;
       }
     }