aboutsummaryrefslogtreecommitdiff
path: root/src/OT/Layout/GPOS/PairPosFormat2.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/OT/Layout/GPOS/PairPosFormat2.hh')
-rw-r--r--src/OT/Layout/GPOS/PairPosFormat2.hh27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/OT/Layout/GPOS/PairPosFormat2.hh b/src/OT/Layout/GPOS/PairPosFormat2.hh
index 9c87ac2b0..83b093b98 100644
--- a/src/OT/Layout/GPOS/PairPosFormat2.hh
+++ b/src/OT/Layout/GPOS/PairPosFormat2.hh
@@ -220,25 +220,17 @@ struct PairPosFormat2_4
if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ())
{
c->buffer->message (c->font,
- "try kerning glyphs at %d,%d",
+ "kerning glyphs at %d,%d",
c->buffer->idx, skippy_iter.idx);
}
applied_first = valueFormat1.apply_value (c, this, v, buffer->cur_pos());
applied_second = valueFormat2.apply_value (c, this, v + len1, buffer->pos[skippy_iter.idx]);
- if (applied_first || applied_second)
- if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ())
- {
- c->buffer->message (c->font,
- "kerned glyphs at %d,%d",
- c->buffer->idx, skippy_iter.idx);
- }
-
if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ())
{
c->buffer->message (c->font,
- "tried kerning glyphs at %d,%d",
+ "kerned glyphs at %d,%d",
c->buffer->idx, skippy_iter.idx);
}
@@ -249,15 +241,10 @@ struct PairPosFormat2_4
boring:
buffer->unsafe_to_concat (buffer->idx, skippy_iter.idx + 1);
- if (len2)
- {
- skippy_iter.idx++;
- // https://github.com/harfbuzz/harfbuzz/issues/3824
- // https://github.com/harfbuzz/harfbuzz/issues/3888#issuecomment-1326781116
- buffer->unsafe_to_break (buffer->idx, skippy_iter.idx + 1);
- }
buffer->idx = skippy_iter.idx;
+ if (len2)
+ buffer->idx++;
return_trace (true);
}
@@ -322,7 +309,6 @@ struct PairPosFormat2_4
{
unsigned len1 = valueFormat1.get_len ();
unsigned len2 = valueFormat2.get_len ();
- unsigned record_size = len1 + len2;
unsigned format1 = 0;
unsigned format2 = 0;
@@ -331,13 +317,10 @@ struct PairPosFormat2_4
{
for (unsigned class2_idx : + hb_range ((unsigned) class2Count) | hb_filter (klass2_map))
{
- unsigned idx = (class1_idx * (unsigned) class2Count + class2_idx) * record_size;
+ unsigned idx = (class1_idx * (unsigned) class2Count + class2_idx) * (len1 + len2);
format1 = format1 | valueFormat1.get_effective_format (&values[idx]);
format2 = format2 | valueFormat2.get_effective_format (&values[idx + len1]);
}
-
- if (format1 == valueFormat1 && format2 == valueFormat2)
- break;
}
return hb_pair (format1, format2);