[Indic] Position final subjoined consonants (and vowels) after matras

In Khmer, a final subjoined consonant or independent vowel can occur
after matras.  This final subjoined thing should NOT be reordered to
before the matra even though it's subjoined.

Fixes another 1k of the Khmer failures.  Not much left really.
This commit is contained in:
Behdad Esfahbod 2012-07-17 12:50:13 -04:00
parent c50ed71e9a
commit 55f70ebfb9
3 changed files with 16 additions and 0 deletions

View File

@ -75,6 +75,7 @@ enum indic_position_t {
POS_BELOW_M,
POS_POST_C,
POS_POST_M,
POS_FINAL_C,
POS_SMVD
};

View File

@ -429,8 +429,21 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
for (unsigned int i = start; i < base; i++)
info[i].indic_position() = POS_PRE_C;
info[base].indic_position() = POS_BASE_C;
/* Mark final consonants. A final consonant is one appearing after a matra,
* like in Khmer. */
for (unsigned int i = base + 1; i < end; i++)
if (info[i].indic_category() == OT_M) {
for (unsigned int j = i + 1; j < end; j++)
if (is_consonant (info[j])) {
info[j].indic_position() = POS_FINAL_C;
break;
}
break;
}
/* Handle beginning Ra */
if (has_reph)
info[start].indic_position() = POS_RA_TO_BECOME_REPH;

View File

@ -8,3 +8,5 @@
រ៍
សៅ
រ្ឥ
ងឹ្ឈ
ង្ឈឹ