Extend clusters backwards, into the out-buffer too
This commit is contained in:
parent
77471e0371
commit
cd5891493d
|
@ -436,6 +436,15 @@ hb_buffer_t::merge_clusters (unsigned int start,
|
||||||
while (end < len && info[end - 1].cluster == info[end].cluster)
|
while (end < len && info[end - 1].cluster == info[end].cluster)
|
||||||
end++;
|
end++;
|
||||||
|
|
||||||
|
/* Extend start */
|
||||||
|
while (idx < start && info[start - 1].cluster == info[start].cluster)
|
||||||
|
start--;
|
||||||
|
|
||||||
|
/* If we hit the start of buffer, continue in out-buffer. */
|
||||||
|
if (idx == start)
|
||||||
|
for (unsigned i = out_len; i && out_info[i - 1].cluster == info[start].cluster; i--)
|
||||||
|
out_info[i - 1].cluster = cluster;
|
||||||
|
|
||||||
for (unsigned int i = start; i < end; i++)
|
for (unsigned int i = start; i < end; i++)
|
||||||
info[i].cluster = cluster;
|
info[i].cluster = cluster;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue