aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2023-12-21 13:34:54 +0800
committerPo Lu2023-12-21 13:37:49 +0800
commit22da40a5e5057c2cdea2f54f1ac590ddc9d831cb (patch)
treebd72d85cfecd95c2c84f8e8bab1404faf4374f7d /src
parent4239c27f3867b558ae2e26950d5153d496b02d8f (diff)
downloademacs-22da40a5e5057c2cdea2f54f1ac590ddc9d831cb.tar.gz
emacs-22da40a5e5057c2cdea2f54f1ac590ddc9d831cb.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/sfnt.c6
1 files 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,
3088 /* The contour is empty. */ 3088 /* The contour is empty. */
3089 3089
3090 if (here == last) 3090 if (here == last)
3091 return 1; 3091 /* An empty contour, if redundant, is not necessarily invalid. */
3092 return 0;
3092 3093
3093 /* Move the pen to the start of the contour. Apparently some fonts 3094 /* Move the pen to the start of the contour. Apparently some fonts
3094 have off the curve points as the start of a contour, so when that 3095 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,
3227 /* The contour is empty. */ 3228 /* The contour is empty. */
3228 3229
3229 if (here == last) 3230 if (here == last)
3230 return 1; 3231 /* An empty contour, if redundant, is not necessarily invalid. */
3232 return 0;
3231 3233
3232 /* Move the pen to the start of the contour. Apparently some fonts 3234 /* Move the pen to the start of the contour. Apparently some fonts
3233 have off the curve points as the start of a contour, so when that 3235 have off the curve points as the start of a contour, so when that