提交 29531128 编写于 作者: B Behdad Esfahbod

[indic] Improve reph formation of Sinhala and Telugu

Sinhala and Telugu use "explicit" reph.  That is, the reph is formed by
a Ra,H,ZWJ sequence.  Previously, upon detecting this sequence, we were
checking checking whether the 'rphf' feature applies to the first two
glyphs of the sequence.  This is how the Microsoft fonts are designed.
However, testing with Noto shows that apparently Uniscribe also forms
the reph if the lookup ligates all three glyphs.  So, try both
sequences.

Doesn't affect test results for Sinhala or Telugu.

https://code.google.com/a/google.com/p/noto-alpha/issues/detail?id=232
上级 8c703f13
...@@ -726,8 +726,13 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, ...@@ -726,8 +726,13 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
)) ))
{ {
/* See if it matches the 'rphf' feature. */ /* See if it matches the 'rphf' feature. */
hb_codepoint_t glyphs[2] = {info[start].codepoint, info[start + 1].codepoint}; hb_codepoint_t glyphs[3] = {info[start].codepoint,
if (indic_plan->rphf.would_substitute (glyphs, ARRAY_LENGTH (glyphs), face)) info[start + 1].codepoint,
indic_plan->config->reph_mode == REPH_MODE_EXPLICIT ?
info[start + 2].codepoint : 0};
if (indic_plan->rphf.would_substitute (glyphs, 2, face) ||
(indic_plan->config->reph_mode == REPH_MODE_EXPLICIT &&
indic_plan->rphf.would_substitute (glyphs, 3, face)))
{ {
limit += 2; limit += 2;
while (limit < end && is_joiner (info[limit])) while (limit < end && is_joiner (info[limit]))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册