Don't deserialize positions if buffer has no positions
This commit is contained in:
parent
862b1644e9
commit
9ea0aa43ac
|
@ -282,6 +282,9 @@ hb_buffer_serialize_glyphs (hb_buffer_t *buffer,
|
||||||
assert ((!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID) ||
|
assert ((!buffer->len && buffer->content_type == HB_BUFFER_CONTENT_TYPE_INVALID) ||
|
||||||
buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS);
|
buffer->content_type == HB_BUFFER_CONTENT_TYPE_GLYPHS);
|
||||||
|
|
||||||
|
if (!buffer->have_positions)
|
||||||
|
flags |= HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS;
|
||||||
|
|
||||||
if (unlikely (start == end))
|
if (unlikely (start == end))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
|
@ -1020,8 +1020,6 @@ inline void hb_ot_map_t::apply (const Proxy &proxy,
|
||||||
buf, sizeof (buf), NULL,
|
buf, sizeof (buf), NULL,
|
||||||
font,
|
font,
|
||||||
HB_BUFFER_SERIALIZE_FORMAT_TEXT,
|
HB_BUFFER_SERIALIZE_FORMAT_TEXT,
|
||||||
Proxy::table_index == 0 ?
|
|
||||||
HB_BUFFER_SERIALIZE_FLAG_NO_POSITIONS :
|
|
||||||
HB_BUFFER_SERIALIZE_FLAG_DEFAULT);
|
HB_BUFFER_SERIALIZE_FLAG_DEFAULT);
|
||||||
printf ("buf: [%s]\n", buf);
|
printf ("buf: [%s]\n", buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue