提交 3285e107 编写于 作者: B Behdad Esfahbod

[Indic] Implement Sinhala "Al Lakuna" Reph behavior

In Sinhala, Reph is formed only explicitly, by the presence of a ZWJ.
上级 91cade75
......@@ -269,6 +269,8 @@ static const hb_codepoint_t ra_chars[] = {
0x0CB0, /* Kannada */
0x0D30, /* Malayalam */ /* No Reph, Logical Repha */
0x0DBB, /* Sinhala */ /* Reph formed only with ZWJ */
0x179A, /* Khmer */ /* No Reph, Visual Repha */
};
......
......@@ -356,9 +356,14 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
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;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册