[gsubgpos] Minor simplification

Just changed the order, no functional change
This commit is contained in:
Ebrahim Byagowi 2020-03-26 11:18:02 +04:30
parent 1a48278511
commit cc977b6e5c
1 changed files with 12 additions and 11 deletions

View File

@ -1073,18 +1073,19 @@ static inline bool ligate_input (hb_ot_apply_context_t *c,
buffer->idx++; buffer->idx++;
} }
if (!is_mark_ligature && last_lig_id) { if (!is_mark_ligature && last_lig_id)
{
/* Re-adjust components for any marks following. */ /* Re-adjust components for any marks following. */
for (unsigned int i = buffer->idx; i < buffer->len; i++) { for (unsigned i = buffer->idx; i < buffer->len; ++i)
if (last_lig_id == _hb_glyph_info_get_lig_id (&buffer->info[i])) { {
unsigned int this_comp = _hb_glyph_info_get_lig_comp (&buffer->info[i]); if (last_lig_id != _hb_glyph_info_get_lig_id (&buffer->info[i])) break;
if (!this_comp)
break; unsigned this_comp = _hb_glyph_info_get_lig_comp (&buffer->info[i]);
unsigned int new_lig_comp = components_so_far - last_num_components + if (!this_comp) break;
hb_min (this_comp, last_num_components);
_hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig_comp); unsigned new_lig_comp = components_so_far - last_num_components +
} else hb_min (this_comp, last_num_components);
break; _hb_glyph_info_set_lig_props_for_mark (&buffer->info[i], lig_id, new_lig_comp);
} }
} }
return_trace (true); return_trace (true);