[Indic] Add example of different Uniscribe behavior

This commit is contained in:
Behdad Esfahbod 2012-05-11 16:51:23 +02:00
parent ebe29733d4
commit 67ea29af49
1 changed files with 4 additions and 1 deletions

View File

@ -373,6 +373,10 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H)))) if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H))))
info[i].indic_position() = info[i - 1].indic_position(); info[i].indic_position() = info[i - 1].indic_position();
} else { } else {
/*
* Uniscribe doesn't move the Halant with Left Matra.
* TEST: U+092B,U+093F,U+094DE
*/
/* Please update the non-Uniscribe branch when touching this! */ /* Please update the non-Uniscribe branch when touching this! */
for (unsigned int i = start + 1; i < end; i++) for (unsigned int i = start + 1; i < end; i++)
if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H)))) { if ((FLAG (info[i].indic_category()) & (FLAG (OT_ZWNJ) | FLAG (OT_ZWJ) | FLAG (OT_N) | FLAG (OT_H)))) {
@ -380,7 +384,6 @@ initial_reordering_consonant_syllable (const hb_ot_map_t *map, hb_buffer_t *buff
if (info[i].indic_category() == OT_H && info[i].indic_position() == POS_LEFT_MATRA) if (info[i].indic_category() == OT_H && info[i].indic_position() == POS_LEFT_MATRA)
for (unsigned int j = i; j > start; j--) for (unsigned int j = i; j > start; j--)
if (info[j - 1].indic_position() != POS_LEFT_MATRA) { if (info[j - 1].indic_position() != POS_LEFT_MATRA) {
/* Uniscribe doesn't move the Halant with Left Matra. */
info[i].indic_position() = info[j - 1].indic_position(); info[i].indic_position() = info[j - 1].indic_position();
break; break;
} }