mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[glyf] Avoid a SubsetGlyph copy
Unfortunately hb_second() always does a copy...
This commit is contained in:
parent
33ea8b5e5d
commit
0e0110e7f2
1 changed files with 3 additions and 7 deletions
|
@ -54,8 +54,8 @@ struct glyf
|
|||
TRACE_SERIALIZE (this);
|
||||
|
||||
unsigned init_len = c->length ();
|
||||
for (const auto &_ : it)
|
||||
if (unlikely (!_.serialize (c, use_short_loca, plan)))
|
||||
for (auto &_ : it)
|
||||
if (unlikely (!_.second.serialize (c, use_short_loca, plan)))
|
||||
return false;
|
||||
|
||||
/* As a special case when all glyph in the font are empty, add a zero byte
|
||||
|
@ -136,11 +136,7 @@ struct glyf
|
|||
padded_offsets.arrayZ[i] = 0;
|
||||
}
|
||||
|
||||
auto it =
|
||||
+ hb_iter (glyphs)
|
||||
| hb_map (hb_second)
|
||||
;
|
||||
bool result = glyf_prime->serialize (c->serializer, it, use_short_loca, c->plan);
|
||||
bool result = glyf_prime->serialize (c->serializer, glyphs, use_short_loca, c->plan);
|
||||
if (c->plan->normalized_coords && !c->plan->pinned_at_default)
|
||||
_free_compiled_subset_glyphs (glyphs);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue