[Indic] Allow two Nuktas per consonant
authorBehdad Esfahbod <behdad@behdad.org>
Fri, 11 May 2012 16:13:42 +0000 (18:13 +0200)
committerBehdad Esfahbod <behdad@behdad.org>
Fri, 11 May 2012 16:13:42 +0000 (18:13 +0200)
Uniscribe allows up to two nuktas per consonant and one per matra. It does so
indepent of whether the consonant already has a nukta in it.  Tests:

        * U+0916,U+093C,U+0941
        * U+0959,U+093C,U+0941
        * U+0916,U+093C,U+093C,U+0941
        * U+0959,U+093C,U+093C,U+0941
        * U+0916,U+093C,U+093C,U+093C,U+0941
        * U+0959,U+093C,U+093C,U+093C,U+0941
        * 915,93c,93c,,94d,U+0916,U+093C,U+093C,U+093e,93c,93c

src/hb-ot-shape-complex-indic-machine.rl

index b26e2a7..dedcc5c 100644 (file)
@@ -55,14 +55,15 @@ A    = 11;
 NBSP = 12;
 
 c = C | Ra;
+n = N N?;
 z = ZWJ|ZWNJ;
 matra_group = M N? H?;
 syllable_tail = SM? (VD VD?)?;
 
 
-consonant_syllable =   (c.N? (H.z?|z.H))* c.N? A? (H.z? | matra_group*)? syllable_tail;
-vowel_syllable =       (Ra H)? V N? (z?.H.c | ZWJ.c)? matra_group* syllable_tail;
-standalone_cluster =   (Ra H)? NBSP N? (z? H c)? matra_group* syllable_tail;
+consonant_syllable =   (c.n? (H.z?|z.H))* c.n? A? (H.z? | matra_group*)? syllable_tail;
+vowel_syllable =       (Ra H)? V n? (z?.H.c | ZWJ.c)? matra_group* syllable_tail;
+standalone_cluster =   (Ra H)? NBSP n? (z? H c)? matra_group* syllable_tail;
 other =                        any;
 
 main := |*