[instancer] trim .notdef outline data after recalc bounds

If outline data present, we use it to recalc bounds and then trim it
accordingly
This commit is contained in:
Qunxin Liu 2023-01-18 15:23:24 -08:00
parent 0de7f83a9f
commit 30058f489a
2 changed files with 5 additions and 1 deletions

View File

@ -187,7 +187,11 @@ struct Glyph
// it
if (gid == 0 &&
!(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE))
{
type = EMPTY;
dest_start = hb_bytes_t ();
dest_end = hb_bytes_t ();
}
//dont compile bytes when pinned at default, just recalculate bounds
if (!plan->pinned_at_default) {

View File

@ -407,7 +407,7 @@ glyf::_populate_subset_glyphs (const hb_subset_plan_t *plan,
if (unlikely (new_gid == 0 &&
!(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE)) &&
plan->pinned_at_default)
!plan->normalized_coords)
subset_glyph.source_glyph = glyf_impl::Glyph ();
else
{