0x0CB0, /* Kannada */
0x0D30, /* Malayalam */ /* No Reph, Logical Repha */
+ 0x0DBB, /* Sinhala */ /* Reph formed only with ZWJ */
+
0x179A, /* Khmer */ /* No Reph, Visual Repha */
};
start + 3 <= end &&
info[start].indic_category() == OT_Ra &&
info[start + 1].indic_category() == OT_H &&
- !is_joiner (info[start + 2]))
+ (unlikely (buffer->props.script == HB_SCRIPT_SINHALA) ?
+ info[start + 2].indic_category() == OT_ZWJ /* In Sinhala, form Reph only if ZWJ is present */:
+ !is_joiner (info[start + 2] /* In other scripts, any joiner blocks Reph formation */ )
+ ))
{
limit += 2;
+ while (limit < end && is_joiner (info[limit]))
+ limit++;
base = start;
has_reph = true;
};