mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[subset/glyf] Fix for non-monotonic glyphmap
Slows things down again, but is correct. Still a good win combined with the previous changes.
This commit is contained in:
parent
66ce902c3a
commit
0f12fd5a66
1 changed files with 4 additions and 3 deletions
|
@ -450,14 +450,15 @@ glyf::_populate_subset_glyphs (const hb_subset_plan_t *plan,
|
|||
OT::glyf_accelerator_t glyf (plan->source);
|
||||
if (!glyphs.alloc (plan->glyph_map->get_population (), true)) return false;
|
||||
|
||||
for (hb_codepoint_t old_gid : *plan->glyphset ())
|
||||
for (hb_codepoint_t old_gid : plan->new_to_old_gid_list)
|
||||
{
|
||||
hb_codepoint_t new_gid = (*plan->glyph_map)[old_gid];
|
||||
if (old_gid == HB_MAP_VALUE_INVALID)
|
||||
continue;
|
||||
glyf_impl::SubsetGlyph *p = glyphs.push ();
|
||||
glyf_impl::SubsetGlyph& subset_glyph = *p;
|
||||
subset_glyph.old_gid = old_gid;
|
||||
|
||||
if (unlikely (old_gid == 0 && new_gid == 0 &&
|
||||
if (unlikely (old_gid == 0 &&
|
||||
!(plan->flags & HB_SUBSET_FLAGS_NOTDEF_OUTLINE)) &&
|
||||
!plan->normalized_coords)
|
||||
subset_glyph.source_glyph = glyf_impl::Glyph ();
|
||||
|
|
Loading…
Add table
Reference in a new issue