Don't deserialize positions if buffer has no positions

This commit is contained in:
Behdad Esfahbod 2015-12-18 17:30:18 +00:00
parent 862b1644e9
commit 9ea0aa43ac
2 changed files with 3 additions and 2 deletions

View File

@ -282,6 +282,9 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer,
assert ((!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID) ||
buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS);
if (!buffer->have_positions)
flags |= HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS;
if (unlikely (start == end))
return 0;

View File

@ -1020,8 +1020,6 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
buf, sizeof (buf), NULL,
font,
HB_BUFFER_SERIALIZE_FORMAT_TEXT,
Proxy::table_index == 0 ?
HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS :
HB_BUFFER_SERIALIZE_FLAG_DEFAULT);
printf ("buf: [%s]\n", buf);
#endif