emacs-diffs
[Top][All Lists]
Advanced

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

master 22da40a5e50: Accept empty contours in glyphs


From: Po Lu
Subject: master 22da40a5e50: Accept empty contours in glyphs
Date: Thu, 21 Dec 2023 00:38:01 -0500 (EST)

branch: master
commit 22da40a5e5057c2cdea2f54f1ac590ddc9d831cb
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Accept empty contours in glyphs
    
    * src/sfnt.c (sfnt_decompose_glyph_1, sfnt_decompose_glyph_2):
    Accept empty contours, for they are not invalid, just redundant.
---
 src/sfnt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/sfnt.c b/src/sfnt.c
index eb3add7390e..4d377ddf5e5 100644
--- a/src/sfnt.c
+++ b/src/sfnt.c
@@ -3088,7 +3088,8 @@ sfnt_decompose_glyph_1 (size_t here, size_t last,
   /* The contour is empty.  */
 
   if (here == last)
-    return 1;
+    /* An empty contour, if redundant, is not necessarily invalid.  */
+    return 0;
 
   /* Move the pen to the start of the contour.  Apparently some fonts
      have off the curve points as the start of a contour, so when that
@@ -3227,7 +3228,8 @@ sfnt_decompose_glyph_2 (size_t here, size_t last,
   /* The contour is empty.  */
 
   if (here == last)
-    return 1;
+    /* An empty contour, if redundant, is not necessarily invalid.  */
+    return 0;
 
   /* Move the pen to the start of the contour.  Apparently some fonts
      have off the curve points as the start of a contour, so when that



reply via email to

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