[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:
parent
54ae3345b2
commit
05aa084e67
|
@ -241,15 +241,16 @@ struct PairPosFormat2_4
|
||||||
boring:
|
boring:
|
||||||
buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
|
buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
|
||||||
|
|
||||||
|
|
||||||
buffer->idx = skippy_iter.idx;
|
|
||||||
if (len2)
|
if (len2)
|
||||||
{
|
{
|
||||||
buffer->idx++;
|
skippy_iter.idx++;
|
||||||
// https://github.com/harfbuzz/harfbuzz/issues/3824
|
// 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);
|
return_trace (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,8 +132,9 @@ struct PairSet
|
||||||
if (len2)
|
if (len2)
|
||||||
{
|
{
|
||||||
pos++;
|
pos++;
|
||||||
// https://github.com/harfbuzz/harfbuzz/issues/3824
|
// https://github.com/harfbuzz/harfbuzz/issues/3824
|
||||||
buffer->unsafe_to_break (pos - 1, pos + 1);
|
// https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
|
||||||
|
buffer->unsafe_to_break (buffer->idx, pos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer->idx = pos;
|
buffer->idx = pos;
|
||||||
|
|
Loading…
Reference in New Issue