diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-12-06 22:07:11 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-12-06 22:07:11 +0000 |
commit | 520013cab0678357f8b15b8e719d6181a0246ca2 (patch) | |
tree | 8d541e60701a3d30b6d7ff310dee3fa896db3870 /modules/indic | |
parent | 46ca305baed090eb531a48e476b19e0a9be673e5 (diff) | |
download | pango-520013cab0678357f8b15b8e719d6181a0246ca2.tar.gz |
Red Hat Bug 216850: Issue in combination with vowels (ml_IN) Patch from
2006-12-06 Behdad Esfahbod <behdad@gnome.org>
Red Hat Bug 216850: Issue in combination with vowels (ml_IN)
Patch from LingNing Zhang
* modules/indic/indic-ot.c (indic_ot_reorder): Fix it!
Diffstat (limited to 'modules/indic')
-rw-r--r-- | modules/indic/indic-ot.c | 47 |
1 files changed, 10 insertions, 37 deletions
diff --git a/modules/indic/indic-ot.c b/modules/indic/indic-ot.c index 3af5e119..68d7f105 100644 --- a/modules/indic/indic-ot.c +++ b/modules/indic/indic-ot.c @@ -143,31 +143,6 @@ static void noteBaseConsonant(Output *output) } } -static void shiftCharsLeft3(Output *output) -{ - if (output->fOutChars != NULL) { - gunichar temp_char; - guint32 temp_index; - gulong temp_tag; - - temp_char = output->fOutChars[output->fOutIndex - 3]; - temp_index = output->fCharIndices[output->fOutIndex - 3]; - temp_tag = output->fCharTags[output->fOutIndex - 3]; - - output->fOutChars[output->fOutIndex - 3] = output->fOutChars[output->fOutIndex - 2]; - output->fCharIndices[output->fOutIndex - 3] = output->fCharIndices[output->fOutIndex - 2]; - output->fCharTags[output->fOutIndex - 3] = output->fCharTags[output->fOutIndex - 2]; - - output->fOutChars[output->fOutIndex - 2] = output->fOutChars[output->fOutIndex - 1]; - output->fCharIndices[output->fOutIndex - 2] = output->fCharIndices[output->fOutIndex - 1]; - output->fCharTags[output->fOutIndex - 2] = output->fCharTags[output->fOutIndex - 1]; - - output->fOutChars[output->fOutIndex - 1] = temp_char; - output->fCharIndices[output->fOutIndex - 1] = temp_index; - output->fCharTags[output->fOutIndex - 1] = temp_tag; - } -} - static void swapChars(Output *output, int a, int b) { if (output->fOutChars != NULL) { @@ -445,23 +420,21 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c writeChar(&output, chars[i], /*i*/ prev, nukt_p); } - /* for the special conjuction of Cons+0x0d4d+0x0d31 of Malayalam */ - if ((baseConsonant - 2 >= 0) && - (chars[baseConsonant - 1] == 0x0d4d) && - (chars[baseConsonant] == 0x0d31) && - ((chars[baseConsonant - 2] >= 0x0d15) && - (chars[baseConsonant - 2] <= 0x0d39))) { - swapChars (&output, -1, -3); - } - - /* for the special conjuction of Cons+0x0d4d+0x0d30 of Malayalam */ + /* for the special conjuction of Cons+0x0d4d+0x0d31 or Cons+0x0d4d+0x0d30 of Malayalam */ if ((baseConsonant - 2 >= 0) && (chars[baseConsonant - 1] == 0x0d4d) && - (chars[baseConsonant] == 0x0d30) && + ((chars[baseConsonant] == 0x0d31) || + (chars[baseConsonant] == 0x0d30)) && ((chars[baseConsonant - 2] >= 0x0d15) && (chars[baseConsonant - 2] <= 0x0d39))) { swapChars (&output, -1, -3); - } + + if (mpreFixups) { + if (mpreFixups->fFixupCount > 0) { + mpreFixups->fFixupCount--; + } + } + } if ((class_table->scriptFlags & SF_MATRAS_AFTER_BASE) != 0) { writeMbelow(&output); |