From dff0ece11d61978c04e839501f179a5c3077f340 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 24 Jul 2012 02:30:38 -0400 Subject: [PATCH] [Indic] Limit matras to 4 per syllable Also limit joiners. This limits our syllable length to a constant, and is closer to what Uniscribe does anyway. Two Devanagari tests regressed, but who cares about tests with 20 joiners in a row?! Devanagari at 57 (0.00821766%) now. --- src/hb-ot-shape-complex-indic-machine.rl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shape-complex-indic-machine.rl b/src/hb-ot-shape-complex-indic-machine.rl index 69e5aa102..25e308d2b 100644 --- a/src/hb-ot-shape-complex-indic-machine.rl +++ b/src/hb-ot-shape-complex-indic-machine.rl @@ -64,12 +64,12 @@ reph = (Ra H | Repha); # possible reph cn = c.n?; forced_rakar = ZWJ H ZWJ Ra; -matra_group = z*.M.N?.(H | forced_rakar)?; +matra_group = z{0,3}.M.N?.(H | forced_rakar)?; syllable_tail = (SM.ZWNJ?)? (Coeng (cn|V))? (VD VD?)?; place_holder = NBSP | DOTTEDCIRCLE; halant_group = (z?.h.ZWJ?); final_halant_group = halant_group | h.ZWNJ; -halant_or_matra_group = (final_halant_group | matra_group*); +halant_or_matra_group = (final_halant_group | matra_group{0,4}); consonant_syllable = Repha? (cn.halant_group){0,4} cn A? halant_or_matra_group? syllable_tail;