Don't rely on .cluster field in fallback_position
Fixes tests/cluster. Fixes https://github.com/behdad/harfbuzz/pull/123
This commit is contained in:
parent
f3792342f6
commit
9099e48e29
@ -418,13 +418,12 @@ _hb_ot_shape_fallback_position (const hb_ot_shape_plan_t *plan,
|
||||
_hb_buffer_assert_gsubgpos_vars (buffer);
|
||||
|
||||
unsigned int start = 0;
|
||||
unsigned int last_cluster = buffer->info[0].cluster;
|
||||
unsigned int count = buffer->len;
|
||||
hb_glyph_info_t *info = buffer->info;
|
||||
for (unsigned int i = 1; i < count; i++)
|
||||
if (buffer->info[i].cluster != last_cluster) {
|
||||
if (likely (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&info[i])))) {
|
||||
position_cluster (plan, font, buffer, start, i);
|
||||
start = i;
|
||||
last_cluster = buffer->info[i].cluster;
|
||||
}
|
||||
position_cluster (plan, font, buffer, start, count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user