diff -r -u pango-1.14.8.orig/modules/indic/indic-ot.c pango-1.14.8/modules/indic/indic-ot.c --- pango-1.14.8.orig/modules/indic/indic-ot.c 2006-10-16 19:18:28.000000000 +0530 +++ pango-1.14.8/modules/indic/indic-ot.c 2008-02-29 12:41:17.000000000 +0530 @@ -304,6 +304,12 @@ case CC_MODIFYING_MARK_POST: case CC_NUKTA: case CC_VIRAMA: + /* patch for rendering fix for Malayalam SAMVRUTHOKARA by suresh */ + if (chars[prev - 1] == 0x0D41) { + writeChar(&output, chars[prev], prev, blwf_p); + break; + } + /* end patch */ case CC_AL_LAKUNA: writeChar(&output, C_DOTTED_CIRCLE, prev, blwf_p); writeChar(&output, chars[prev], prev, blwf_p); @@ -442,24 +448,6 @@ 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 */ - if ((baseConsonant - 2 >= 0) && - (chars[baseConsonant - 1] == 0x0d4d) && - (chars[baseConsonant] == 0x0d30) && - ((chars[baseConsonant - 2] >= 0x0d15) && - (chars[baseConsonant - 2] <= 0x0d39))) { - swapChars (&output, -1, -3); - } - if ((class_table->scriptFlags & SF_MATRAS_AFTER_BASE) != 0) { writeMbelow(&output); writeMabove(&output); diff -r -u pango-1.14.8.orig/modules/indic/mprefixups.c pango-1.14.8/modules/indic/mprefixups.c --- pango-1.14.8.orig/modules/indic/mprefixups.c 2006-01-16 15:44:24.000000000 +0530 +++ pango-1.14.8/modules/indic/mprefixups.c 2008-03-02 16:45:21.000000000 +0530 @@ -89,6 +89,32 @@ mpreLimit = i + 1; } } + /* patch by suresh for fixing pre-base matra reorder for conjuncts */ + /* make three more trys for baseGlyph */ + /* for a simple conjunct */ + if (baseGlyph < 0) { + for (i = 0; i < n_glyphs; i++) { + if (glyphs[i].cluster == (baseIndex - 2)) + baseGlyph = i; + } + } + /* for bigger one */ + if (baseGlyph < 0) { + for (i = 0; i < n_glyphs; i++) { + if (glyphs[i].cluster == (baseIndex - 4)) + baseGlyph = i; + } + } + /* for the biggest */ + if (baseGlyph < 0) { + for (i = 0; i < n_glyphs; i++) { + if (glyphs[i].cluster == (baseIndex - 6)) + baseGlyph = i; + } + } + /* now leave it */ + /* end patch */ + if (baseGlyph < 0 || mpreGlyph < 0 || mpreLimit >= baseGlyph) { continue; }