From a756bd1944404da6e53173c4061a2aef262e60f3 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 13 Oct 2022 17:18:19 -0600 Subject: [PATCH] [glyf] Use component phantom points after transformation --- src/OT/glyf/Glyph.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index 503112270..0b25659ac 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -288,11 +288,6 @@ struct Glyph deltas, shift_points_hori, use_my_metrics, phantom_only, depth + 1))) return false; - /* Copy phantom points from component if USE_MY_METRICS flag set */ - if (use_my_metrics && item.is_use_my_metrics ()) - for (unsigned int i = 0; i < PHANTOM_COUNT; i++) - phantoms[i] = comp_points[comp_points.length - PHANTOM_COUNT + i]; - /* Apply component transformation & translation */ item.transform_points (comp_points); @@ -313,6 +308,11 @@ struct Glyph } } + /* Copy phantom points from component if USE_MY_METRICS flag set */ + if (use_my_metrics && item.is_use_my_metrics ()) + for (unsigned int i = 0; i < PHANTOM_COUNT; i++) + phantoms[i] = comp_points[comp_points.length - PHANTOM_COUNT + i]; + all_points.extend (comp_points.sub_array (0, comp_points.length - PHANTOM_COUNT)); comp_index++;