[Indic] In Sinhala, form forced Reph even if no other consonant found

Fixes another 10 Sinhala failures.  Down to 148 (0.0544424%).
This commit is contained in:
Behdad Esfahbod 2012-07-24 00:26:43 -04:00
parent 71fd5e80ad
commit 2278eefcdb
2 changed files with 6 additions and 5 deletions

View File

@ -576,17 +576,17 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
info[i].indic_position() = POS_BELOW_C; info[i].indic_position() = POS_BELOW_C;
} }
if (base < start)
base = start; /* Just in case... */
/* -> If the syllable starts with Ra + Halant (in a script that has Reph) /* -> 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 * and has more than one consonant, Ra is excluded from candidates for
* base consonants. */ * base consonants.
if (has_reph && base == start) { *
* Only do this for unforced Reph. (ie. not for Ra,H,ZWJ. */
if (has_reph && base == start && start + 2 == limit) {
/* Have no other consonant, so Reph is not formed and Ra becomes base. */ /* Have no other consonant, so Reph is not formed and Ra becomes base. */
has_reph = false; has_reph = false;
} }
} }
if (base < end) if (base < end)
info[base].indic_position() = POS_BASE_C; info[base].indic_position() = POS_BASE_C;

View File

@ -35,3 +35,4 @@
න්ගේ න්ගේ
න්‍ගේ න්‍ගේ
න‍්ගේ න‍්ගේ
ර්‍