Use foreach_cluster
This commit is contained in:
parent
e4a101ed38
commit
5fddc5f169
|
@ -1860,18 +1860,8 @@ hb_buffer_normalize_glyphs (hb_buffer_t *buffer)
|
||||||
|
|
||||||
bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
|
bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
|
||||||
|
|
||||||
unsigned int count = buffer->len;
|
foreach_cluster (buffer, start, end)
|
||||||
if (unlikely (!count)) return;
|
normalize_glyphs_cluster (buffer, start, end, backward);
|
||||||
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;
|
|
||||||
}
|
|
||||||
normalize_glyphs_cluster (buffer, start, end, backward);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue