diff --git a/src/hb-ot-shape-fallback.cc b/src/hb-ot-shape-fallback.cc index 53274b502..748372d01 100644 --- a/src/hb-ot-shape-fallback.cc +++ b/src/hb-ot-shape-fallback.cc @@ -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); }