mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 15:31:05 +01:00
[glyf] Avoid a SubsetGlyph copy
Unfortunately hb_second() always does a copy...
This commit is contained in:
1 parent
33ea8b5e5d
commit
0e0110e7f2
1 file changed
+3
-7
+3
-7
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user