From 80c870bcda2f421e80f5579e71fe17fe8db991b8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 5 Jan 2018 17:52:24 +0000 Subject: [PATCH] [khmer] Allow Independent Vowels where stacked consonants are allowed New numbers (down from 44): KHMER: 299085 out of 299124 tests passed. 39 failed (0.0130381%) --- src/hb-ot-shape-complex-khmer-machine.rl | 4 ++-- src/hb-ot-shape-complex-khmer.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-ot-shape-complex-khmer-machine.rl b/src/hb-ot-shape-complex-khmer-machine.rl index 70b06decb..f3557b152 100644 --- a/src/hb-ot-shape-complex-khmer-machine.rl +++ b/src/hb-ot-shape-complex-khmer-machine.rl @@ -52,7 +52,7 @@ RS = 13; Coeng = 14; Ra = 16; -c = (C | Ra); # is_consonant +c = (C | Ra | V); # is_consonant n = ((ZWNJ?.RS)? (N.N?)?); # is_consonant_modifier z = ZWJ|ZWNJ; # is_joiner @@ -63,7 +63,7 @@ halant_group = Coeng; halant_or_matra_group = (matra_group{0,4}) (Coeng (cn|V))?; -consonant_syllable = (c|V|PLACEHOLDER|DOTTEDCIRCLE).n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail; +consonant_syllable = (c|PLACEHOLDER|DOTTEDCIRCLE).n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail; broken_cluster = n? (halant_group.cn){0,4} halant_or_matra_group syllable_tail; other = any; diff --git a/src/hb-ot-shape-complex-khmer.cc b/src/hb-ot-shape-complex-khmer.cc index be02bc0a2..2db4f6097 100644 --- a/src/hb-ot-shape-complex-khmer.cc +++ b/src/hb-ot-shape-complex-khmer.cc @@ -75,7 +75,7 @@ is_joiner (const hb_glyph_info_t &info) static inline bool is_consonant (const hb_glyph_info_t &info) { - return is_one_of (info, CONSONANT_FLAGS); + return is_one_of (info, CONSONANT_FLAGS | FLAG (OT_V)); } static inline bool