Extend into main buffer if extension hit end of out-buffer merging clusters
This commit is contained in:
parent
5ced012d9f
commit
e51d2b6ed1
@ -468,6 +468,11 @@ hb_buffer_t::merge_out_clusters (unsigned int start,
|
||||
while (end < out_len && out_info[end - 1].cluster == out_info[end].cluster)
|
||||
end++;
|
||||
|
||||
/* If we hit the end of out-buffer, continue in buffer. */
|
||||
if (end == out_len)
|
||||
for (unsigned i = idx; i < len && info[i].cluster == out_info[end - 1].cluster; i++)
|
||||
info[i].cluster = cluster;
|
||||
|
||||
for (unsigned int i = start; i < end; i++)
|
||||
out_info[i].cluster = cluster;
|
||||
}
|
||||
|
@ -176,15 +176,6 @@ _hb_ot_shape_complex_setup_masks_thai (hb_ot_map_t *map HB_UNUSED,
|
||||
sizeof (buffer->out_info[0]) * (end - start - 2));
|
||||
buffer->out_info[start] = t;
|
||||
|
||||
/* XXX Make this easier! */
|
||||
/* Make cluster */
|
||||
for (; buffer->idx < count;)
|
||||
if (buffer->cur().cluster == buffer->prev().cluster)
|
||||
buffer->next_glyph ();
|
||||
else
|
||||
break;
|
||||
end = buffer->out_len;
|
||||
|
||||
buffer->merge_out_clusters (start, end);
|
||||
}
|
||||
buffer->swap_buffers ();
|
||||
|
Loading…
Reference in New Issue
Block a user