[GPOS] Fix indexing in MarkLigPos
This was broken in 8708b9e081
.
Fixes https://github.com/harfbuzz/harfbuzz/issues/4142
This commit is contained in:
parent
01d34763f0
commit
c67c0086ef
|
@ -126,15 +126,15 @@ struct MarkLigPosFormat1_2
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
j = (unsigned) c->last_base;
|
unsigned idx = (unsigned) c->last_base;
|
||||||
|
|
||||||
/* Checking that matched glyph is actually a ligature by GDEF is too strong; disabled */
|
/* Checking that matched glyph is actually a ligature by GDEF is too strong; disabled */
|
||||||
//if (!_hb_glyph_info_is_ligature (&buffer->info[j])) { return_trace (false); }
|
//if (!_hb_glyph_info_is_ligature (&buffer->info[idx])) { return_trace (false); }
|
||||||
|
|
||||||
unsigned int lig_index = (this+ligatureCoverage).get_coverage (buffer->info[j].codepoint);
|
unsigned int lig_index = (this+ligatureCoverage).get_coverage (buffer->info[idx].codepoint);
|
||||||
if (lig_index == NOT_COVERED)
|
if (lig_index == NOT_COVERED)
|
||||||
{
|
{
|
||||||
buffer->unsafe_to_concat_from_outbuffer (skippy_iter.idx, buffer->idx + 1);
|
buffer->unsafe_to_concat_from_outbuffer (idx, buffer->idx + 1);
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ struct MarkLigPosFormat1_2
|
||||||
unsigned int comp_count = lig_attach.rows;
|
unsigned int comp_count = lig_attach.rows;
|
||||||
if (unlikely (!comp_count))
|
if (unlikely (!comp_count))
|
||||||
{
|
{
|
||||||
buffer->unsafe_to_concat_from_outbuffer (skippy_iter.idx, buffer->idx + 1);
|
buffer->unsafe_to_concat_from_outbuffer (idx, buffer->idx + 1);
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ struct MarkLigPosFormat1_2
|
||||||
* can directly use the component index. If not, we attach the mark
|
* can directly use the component index. If not, we attach the mark
|
||||||
* glyph to the last component of the ligature. */
|
* glyph to the last component of the ligature. */
|
||||||
unsigned int comp_index;
|
unsigned int comp_index;
|
||||||
unsigned int lig_id = _hb_glyph_info_get_lig_id (&buffer->info[j]);
|
unsigned int lig_id = _hb_glyph_info_get_lig_id (&buffer->info[idx]);
|
||||||
unsigned int mark_id = _hb_glyph_info_get_lig_id (&buffer->cur());
|
unsigned int mark_id = _hb_glyph_info_get_lig_id (&buffer->cur());
|
||||||
unsigned int mark_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
|
unsigned int mark_comp = _hb_glyph_info_get_lig_comp (&buffer->cur());
|
||||||
if (lig_id && lig_id == mark_id && mark_comp > 0)
|
if (lig_id && lig_id == mark_id && mark_comp > 0)
|
||||||
|
@ -162,7 +162,7 @@ struct MarkLigPosFormat1_2
|
||||||
else
|
else
|
||||||
comp_index = comp_count - 1;
|
comp_index = comp_count - 1;
|
||||||
|
|
||||||
return_trace ((this+markArray).apply (c, mark_index, comp_index, lig_attach, classCount, j));
|
return_trace ((this+markArray).apply (c, mark_index, comp_index, lig_attach, classCount, idx));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool subset (hb_subset_context_t *c) const
|
bool subset (hb_subset_context_t *c) const
|
||||||
|
|
Loading…
Reference in New Issue