Imported Upstream version 1.7.6
[platform/upstream/harfbuzz.git] / src / hb-ot-shape-complex-use-machine.rl
index f6b814b..11fb470 100644 (file)
@@ -86,21 +86,24 @@ VMPst       = 39; # VOWEL_MOD_POST
 VMPre  = 23; # VOWEL_MOD_PRE
 SMAbv  = 41; # SYM_MOD_ABOVE
 SMBlw  = 42; # SYM_MOD_BELOW
+CS     = 43; # CONS_WITH_STACKER
 
 
-consonant_modifiers = CMAbv* CMBlw* ((H B | SUB) VS? CMAbv? CMBlw*)*;
-medial_consonants = MPre? MAbv? MBlw? MPst?;
+# Override: Adjoc ZWJ placement. https://github.com/harfbuzz/harfbuzz/issues/542#issuecomment-353169729
+consonant_modifiers = CMAbv* CMBlw* ((ZWJ?.H.ZWJ? B | SUB) VS? CMAbv? CMBlw*)*;
+# Override: Allow two MBlw. https://github.com/harfbuzz/harfbuzz/issues/376
+medial_consonants = MPre? MAbv? MBlw?.MBlw? MPst?;
 dependent_vowels = VPre* VAbv* VBlw* VPst*;
 vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*;
 final_consonants = FAbv* FBlw* FPst* FM?;
 
 virama_terminated_cluster =
-       R? (B | GB) VS?
+       (R|CS)? (B | GB) VS?
        consonant_modifiers
-       H
+       ZWJ?.H.ZWJ?
 ;
 standard_cluster =
-       R? (B | GB) VS?
+       (R|CS)? (B | GB) VS?
        consonant_modifiers
        medial_consonants
        dependent_vowels