freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master 93af1f3 2/2: * src/ftdump.c (Print_Programs, Pr


From: Werner Lemberg
Subject: [freetype2-demos] master 93af1f3 2/2: * src/ftdump.c (Print_Programs, Print_Glyfs): Handle no-data glyphs.
Date: Thu, 9 Sep 2021 14:29:46 -0400 (EDT)

branch: master
commit 93af1f33a67f5d31a2fa8f21d30c5cf066a0fcc8
Author: Alexei Podtelezhnikov <apodtele@gmail.com>
Commit: Alexei Podtelezhnikov <apodtele@gmail.com>

    * src/ftdump.c (Print_Programs, Print_Glyfs): Handle no-data glyphs.
---
 src/ftdump.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/ftdump.c b/src/ftdump.c
index a26e546..6528496 100644
--- a/src/ftdump.c
+++ b/src/ftdump.c
@@ -872,7 +872,9 @@
 
       if ( loc + 1 >= end )
       {
-        printf( "\nglyf %hd: invalid offset (%d)\n", i, loc );
+        /* zero-contour glyphs can have no data */
+        if ( len )
+          printf( "\nglyf %hd: invalid offset (%d)\n", i, loc );
         continue;
       }
 
@@ -1018,7 +1020,9 @@
 
       if ( loc + 1 >= end )
       {
-        printf( "\nglyf %hd: invalid offset (%d)\n", i, loc );
+        /* zero-contour glyphs can have no data */
+        if ( len )
+          printf( "\nglyf %hd: invalid offset (%d)\n", i, loc );
         continue;
       }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]