From 422ecd2d3c198a36d07d409341cb82ea57c7ad6b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 18 Jul 2012 23:25:58 -0400 Subject: [PATCH] [Indic] Accept a forced Rakar sequence at the end of syllable In Sinhala, Rakar is formed by Al-Lakuna,ZWJ,Ra. If you put that at the end of a Consonant,Matra syllable, you get a dotted-circle from Uniscribe. Apparently adding a ZWJ before the Al-Lakuna "fixes" that. And people have been encoding that sequence... So, allow a forced "ZWJ,Virama,ZWJ,Ra" sequence at the of syllables. Fixes some 100 or more of Sinhala failures. Now at 622 only (0.23%). --- src/hb-ot-shape-complex-indic-machine.rl | 3 ++- .../in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl index 7fe9a6841..4501773eb 100644 --- a/src/hb-ot-shape-complex-indic-machine.rl +++ b/src/hb-ot-shape-complex-indic-machine.rl @@ -63,7 +63,8 @@ h = H | Coeng; # is_halant_or_coeng reph = (Ra H | Repha); # possible reph cn = c.n?; -matra_group = z*.M.N?.H?; +forced_rakar = ZWJ H ZWJ Ra; +matra_group = z*.M.N?.(H | forced_rakar)?; syllable_tail = SM? (Coeng (cn|V))? (VD VD?)?; place_holder = NBSP | DOTTEDCIRCLE; halant_group = (z?.h.z?); diff --git a/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt b/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt index a8491bf1c..40b5dc57f 100644 --- a/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt +++ b/test/shaping/texts/in-tree/shaper-indic/indic/script-sinhala/misc/misc.txt @@ -5,3 +5,5 @@ කෝ කෝ ස්ට්‍රේ +ක‍්‍රම +ශී‍්‍ර