diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh index d65d3ac5f..7bf282e74 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 65cff5f26..1f0210167 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: *