From: Po Lu Date: Thu, 21 Dec 2023 05:34:54 +0000 (+0800) Subject: Accept empty contours in glyphs X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=22da40a5e5057c2cdea2f54f1ac590ddc9d831cb;p=emacs.git 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. --- 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