[indic] Special-case Kannada Ra,H,ZWJ sequence
Fixes https://github.com/behdad/harfbuzz/issues/435
This commit is contained in:
parent
6bac4ac2be
commit
fa48ccbe12
@ -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;
|
||||
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:
|
||||
*
|
||||
|
@ -61,6 +61,7 @@ TESTS = \
|
||||
tests/indic-joiners.tests \
|
||||
tests/indic-old-spec.tests \
|
||||
tests/indic-pref-blocking.tests \
|
||||
tests/indic-special-cases.tests \
|
||||
tests/indic-syllable.tests \
|
||||
tests/language-tags.tests \
|
||||
tests/ligature-id.tests \
|
||||
|
Binary file not shown.
3
test/shaping/tests/indic-special-cases.tests
Normal file
3
test/shaping/tests/indic-special-cases.tests
Normal file
@ -0,0 +1,3 @@
|
||||
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]
|
Loading…
Reference in New Issue
Block a user