From 527e63a3bd8487d21e423a8a358eee30672eddb6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 13 Oct 2022 17:13:40 -0600 Subject: [PATCH] [glyf/Composite] Remove phantom points when not needed anymore --- src/OT/glyf/Glyph.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 503112270..5d9c11c82 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -293,6 +293,8 @@ struct Glyph for (unsigned int i = 0; i < PHANTOM_COUNT; i++) phantoms[i] = comp_points[comp_points.length - PHANTOM_COUNT + i]; + comp_points.resize (comp_points.length - PHANTOM_COUNT); + /* Apply component transformation & translation */ item.transform_points (comp_points); @@ -313,7 +315,7 @@ struct Glyph } } - all_points.extend (comp_points.sub_array (0, comp_points.length - PHANTOM_COUNT)); + all_points.extend (comp_points); comp_index++; }