From 3d25079f8d6be81b9b4b91d3a97016b8a572f571 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 10 May 2012 11:37:42 +0200 Subject: [PATCH] [Indic] Don't form Reph is Ra is the only consonant in the syllable --- src/hb-ot-shape-complex-indic-private.hh | 2 +- src/hb-ot-shape-complex-indic.cc | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-shape-complex-indic-private.hh b/src/hb-ot-shape-complex-indic-private.hh index d65d3ac5..7bf282e7 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 65cff5f2..1f021016 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: * -- GitLab