Revert "[glyf] Use component phantom points after transformation"

This reverts commit a756bd1944.

Fixes https://github.com/harfbuzz/harfbuzz/issues/3929
This commit is contained in:
Behdad Esfahbod 2022-12-11 12:00:54 -07:00
parent 7f73b57bc1
commit 9ab2c8034e
1 changed files with 9 additions and 6 deletions

View File

@ -324,6 +324,11 @@ struct Glyph
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);
@ -344,16 +349,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.as_array ().sub_array (0, comp_points.length - PHANTOM_COUNT));
if (all_points.length > HB_GLYF_MAX_POINTS)
return false;
all_points.extend (comp_points.as_array ().sub_array (0, comp_points.length - PHANTOM_COUNT));
comp_index++;
}
@ -395,6 +395,9 @@ struct Glyph
all_points.extend (comp_points.as_array ().sub_array (0, comp_points.length - PHANTOM_COUNT));
if (all_points.length > HB_GLYF_MAX_POINTS)
return false;
points_left += item.get_num_points ();
}
all_points.extend (phantoms);