[OT] Make fallback mark positioning more robust

...with clusters spanning multiple base characters.
This commit is contained in:
Behdad Esfahbod 2012-09-06 16:02:07 -04:00
parent 5d502443f5
commit 525c685578
1 changed files with 9 additions and 2 deletions

View File

@ -350,8 +350,15 @@ position_cluster (const hb_ot_shape_plan_t *plan,
for (unsigned int i = start; i < end; i++) for (unsigned int i = start; i < end; i++)
if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[i]))) if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[i])))
{ {
position_around_base (plan, font, buffer, i, end); /* Find mark glyphs */
unsigned int j;
for (j = i + 1; j < end; j++)
if (!HB_UNICODE_GENERAL_CATEGORY_IS_MARK (_hb_glyph_info_get_general_category (&buffer->info[j])))
break; break;
position_around_base (plan, font, buffer, i, j);
i = j - 1;
} }
} }