[glyf] Use component phantom points after transformation

This commit is contained in:
Behdad Esfahbod 2022-10-13 17:18:19 -06:00
parent 82d19c08fc
commit a756bd1944
1 changed files with 5 additions and 5 deletions

View File

@ -288,11 +288,6 @@ struct Glyph
deltas, shift_points_hori, use_my_metrics, phantom_only, depth + 1))) deltas, shift_points_hori, use_my_metrics, phantom_only, depth + 1)))
return false; 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 */ /* Apply component transformation & translation */
item.transform_points (comp_points); 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)); all_points.extend (comp_points.sub_array (0, comp_points.length - PHANTOM_COUNT));
comp_index++; comp_index++;