[PairPos] Another attempt at fixing unsafe-to-break with ValueFormat2

Fixes https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116

Test:
$ hb-shape XBRoya34.ttf  ' الأ' --show-flags --script=arab
This commit is contained in:
Behdad Esfahbod committed 2022-11-24 12:14:09 -07:00
1 parent 54ae3345b2
commit 05aa084e67
2 files changed
+8 -6

No files matched your search

+5 -4
View File
@@ -241,15 +241,16 @@ struct PairPosFormat2_4
boring:
buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
buffer->idx = skippy_iter.idx;
if (len2)
{
buffer->idx++;
skippy_iter.idx++;
// https://github.com/harfbuzz/harfbuzz/issues/3824
buffer->unsafe_to_break (buffer->idx - 1, buffer->idx + 1);
// https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
buffer->unsafe_to_break (buffer->idx, skippy_iter.idx + 1);
}
buffer->idx = skippy_iter.idx;
return_trace (true);
}
+3 -2
View File
@@ -132,8 +132,9 @@ struct PairSet
if (len2)
{
pos++;
// https://github.com/harfbuzz/harfbuzz/issues/3824
buffer->unsafe_to_break (pos - 1, pos + 1);
// https://github.com/harfbuzz/harfbuzz/issues/3824
// https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
buffer->unsafe_to_break (buffer->idx, pos + 1);
}
buffer->idx = pos;