[Indic] Insert dottedcircle after a lone Malayalam dot-reph

This commit is contained in:
Behdad Esfahbod 2012-12-21 19:41:04 -05:00
parent 3cdce6497b
commit 596740db04
3 changed files with 881 additions and 751 deletions

File diff suppressed because it is too large Load Diff

View File

@ -76,7 +76,7 @@ halant_or_matra_group = (final_halant_group | (h.ZWJ)? matra_group{0,4});
consonant_syllable = Repha? (cn.halant_group){0,4} cn A? halant_or_matra_group? syllable_tail;
vowel_syllable = reph? V.n? (ZWJ | (halant_group.cn){0,4} halant_or_matra_group? syllable_tail);
standalone_cluster = reph? place_holder.n? (halant_group.cn){0,4} halant_or_matra_group? syllable_tail;
broken_cluster = n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail;
broken_cluster = reph? n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail;
other = any;
main := |*

View File

@ -894,14 +894,23 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
syllable_type_t syllable_type = (syllable_type_t) (syllable & 0x0F);
if (unlikely (last_syllable != syllable && syllable_type == broken_cluster))
{
last_syllable = syllable;
hb_glyph_info_t info = dottedcircle;
info.cluster = buffer->cur().cluster;
info.mask = buffer->cur().mask;
info.syllable() = buffer->cur().syllable();
/* Insert dottedcircle after possible Repha. */
while (buffer->idx < buffer->len &&
last_syllable == buffer->cur().syllable() &&
buffer->cur().indic_category() == OT_Repha)
buffer->next_glyph ();
buffer->output_info (info);
last_syllable = syllable;
}
buffer->next_glyph ();
else
buffer->next_glyph ();
}
buffer->swap_buffers ();