[syllabic] Better fix for previous issue

With previous fix the GPOS application was still reading the syllable()
member, which was already freed.  This fix is more correct.
This commit is contained in:
Behdad Esfahbod 2023-04-26 10:29:25 -06:00
parent c5f3b3feb1
commit 63afb4f2e7
2 changed files with 2 additions and 5 deletions

View file

@ -487,7 +487,8 @@ struct hb_ot_apply_context_t :
/* Ignore ZWJ if we are matching context, or asked to. */
matcher.set_ignore_zwj (context_match || c->auto_zwj);
matcher.set_mask (context_match ? -1 : c->lookup_mask);
matcher.set_per_syllable (c->per_syllable);
/* Per syllable matching is only for GSUB. */
matcher.set_per_syllable (c->table_index == 0 && c->per_syllable);
}
void set_lookup_props (unsigned int lookup_props)
{

View file

@ -92,10 +92,6 @@ hb_syllabic_clear_var (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
hb_buffer_t *buffer)
{
unsigned count = buffer->len;
hb_glyph_info_t *info = buffer->info;
for (unsigned i = 0; i < count; i++)
info[i].syllable() = 0;
HB_BUFFER_DEALLOCATE_VAR (buffer, syllable);
return false;
}