diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh index d65d3ac5f9e869844f14a3ac6e1fc219ca39ce57..7bf282e74d7d708bdff2e3f88bad0772577f4794 100644 --- a/src/hb-ot-shape-complex-indic-private.hh +++ b/src/hb-ot-shape-complex-indic-private.hh @@ -63,7 +63,7 @@ enum indic_category_t { /* Visual positions in a syllable from left to right. */ enum indic_position_t { - POS_RA, + POS_RA_TO_BECOME_REPH, POS_LEFT_MATRA, POS_PRE_C, diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc index 65cff5f2696001b71202a1e8eb6acae10a9b2767..1f0210167812ba3ebf51b185dbbd6999aff6c6a8 100644 --- a/src/hb-ot-shape-complex-indic.cc +++ b/src/hb-ot-shape-complex-indic.cc @@ -287,6 +287,16 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff if (base < start) base = start; /* Just in case... */ + /* -> If the syllable starts with Ra + Halant (in a script that has Reph) + * and has more than one consonant, Ra is excluded from candidates for + * base consonants. */ + if (has_reph && base == start) { + /* Have no other consonant, so Reph is not formed and Ra becomes base. */ + has_reph = false; + } + + + /* 2. Decompose and reorder Matras: *