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

[indic] Special-case Kannada Ra,H,ZWJ sequence

Fixes https://github.com/behdad/harfbuzz/issues/435
上级 6bac4ac2
...@@ -691,6 +691,21 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan, ...@@ -691,6 +691,21 @@ initial_reordering_consonant_syllable (const hb_ot_shape_plan_t *plan,
const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data; const indic_shape_plan_t *indic_plan = (const indic_shape_plan_t *) plan->data;
hb_glyph_info_t *info = buffer->info; hb_glyph_info_t *info = buffer->info;
/* https://github.com/behdad/harfbuzz/issues/435#issuecomment-335560167
* // For compatibility with legacy useage in Kannada,
* // Ra+h+ZWJ must behave like Ra+ZWJ+h...
*/
if (buffer->props.script == HB_SCRIPT_KANNADA &&
start + 3 <= end &&
is_one_of (info[start ], FLAG (OT_Ra)) &&
is_one_of (info[start+1], FLAG (OT_H)) &&
is_one_of (info[start+2], FLAG (OT_ZWJ)))
{
buffer->merge_clusters (start+1, start+3);
hb_glyph_info_t tmp = info[start+1];
info[start+1] = info[start+2];
info[start+2] = tmp;
}
/* 1. Find base consonant: /* 1. Find base consonant:
* *
......
...@@ -61,6 +61,7 @@ TESTS = \ ...@@ -61,6 +61,7 @@ TESTS = \
tests/indic-joiners.tests \ tests/indic-joiners.tests \
tests/indic-old-spec.tests \ tests/indic-old-spec.tests \
tests/indic-pref-blocking.tests \ tests/indic-pref-blocking.tests \
tests/indic-special-cases.tests \
tests/indic-syllable.tests \ tests/indic-syllable.tests \
tests/language-tags.tests \ tests/language-tags.tests \
tests/ligature-id.tests \ tests/ligature-id.tests \
......
fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf::U+0CB0,U+0CCD,U+0C95:[gid1=0+1176|gid5=0+1161]
fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf::U+0CB0,U+200D,U+0CCD,U+0C95:[gid2=0+1334|gid6=0+358]
fonts/sha1sum/3cae6bfe5b57c07ba81ddbd54c02fe4f3a1e3bf6.ttf::U+0CB0,U+0CCD,U+200D,U+0C95:[gid2=0+1334|gid6=0+358]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册