Use foreach_cluster

This commit is contained in:
Behdad Esfahbod 2019-11-20 13:07:26 -05:00
parent e4a101ed38
commit 5fddc5f169
1 changed files with 2 additions and 12 deletions

View File

@ -1860,17 +1860,7 @@ hb_buffer_normalize_glyphs (hb_buffer_t *buffer)
bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
unsigned int count = buffer->len;
if (unlikely (!count)) return;
hb_glyph_info_t *info = buffer->info;
unsigned int start = 0;
unsigned int end;
for (end = start + 1; end < count; end++)
if (info[start].cluster != info[end].cluster) {
normalize_glyphs_cluster (buffer, start, end, backward);
start = end;
}
foreach_cluster (buffer, start, end)
normalize_glyphs_cluster (buffer, start, end, backward);
}