[gpos] Break cycle-of-2 when cursive attaching

Fix thinko this time around.

Fixes https://github.com/harfbuzz/harfbuzz/issues/2469
This commit is contained in:
Behdad Esfahbod 2020-06-17 17:41:15 -07:00
parent a4955e21fd
commit 9ef9ac3749
1 changed files with 6 additions and 0 deletions

View File

@ -1692,6 +1692,12 @@ struct CursivePosFormat1
else
pos[child].x_offset = x_offset;
/* If parent was attached to child, break them free.
* https://github.com/harfbuzz/harfbuzz/issues/2469
*/
if (unlikely (pos[parent].attach_chain() == -pos[child].attach_chain()))
pos[parent].attach_chain() = 0;
buffer->idx++;
return_trace (true);
}