Index: indic-ot.c
===================================================================
RCS file: /cvs/gnome/pango/modules/indic/indic-ot.c,v
retrieving revision 1.2
diff -u -p -w -r1.2 indic-ot.c
--- indic-ot.c	20 Aug 2002 19:51:37 -0000	1.2
+++ indic-ot.c	1 Jun 2003 07:25:42 -0000
@@ -200,38 +200,38 @@ glong indic_ot_reorder(const gunichar *c
             guint32 length = vmabove - prev;
             glong lastConsonant = vmabove - 1;
             glong baseLimit = prev;
-            glong baseConsonant, postBase;
+            glong baseConsonant, postBase, postBaseLimit;
+	    gboolean seenVattu, seenBelowBaseForm, supressVattu;
+	    glong bcSpan;
 
             /* Check for REPH at front of syllable */
             if (length > 2 && indic_ot_is_reph(class_table, chars[prev]) && indic_ot_is_virama(class_table, chars[prev + 1])) {
-                baseLimit = prev + 2;
+                baseLimit += 2;
 
                 /* Check for eyelash RA, if the script supports it */
                 if ((class_table->scriptFlags & SF_EYELASH_RA) != 0 &&
-                    chars[prev + 2] == C_SIGN_ZWJ) {
+                    chars[baseLimit] == C_SIGN_ZWJ) {
                     if (length > 3) {
                         baseLimit += 1;
                     } else {
-                        baseLimit = prev;
+                        baseLimit -= 2;
                     }
                 }
             }
 
-            while (lastConsonant >= baseLimit && !indic_ot_is_consonant(class_table, chars[lastConsonant])) {
+            while (lastConsonant > baseLimit && !indic_ot_is_consonant(class_table, chars[lastConsonant])) {
                 lastConsonant -= 1;
             }
 
             baseConsonant = lastConsonant;
             postBase = lastConsonant + 1;
 
-            if (lastConsonant >= prev) {
-                glong postBaseLimit = class_table->scriptFlags & SF_POST_BASE_LIMIT_MASK;
-                gboolean seenVattu = false;
-                gboolean seenBelowBaseForm = false;
-                gboolean supressVattu = true;
-                glong bcSpan;
+	    postBaseLimit = class_table->scriptFlags & SF_POST_BASE_LIMIT_MASK;
+	    seenVattu = false;
+	    seenBelowBaseForm = false;
+	    supressVattu = true;
 
-                while (baseConsonant >= baseLimit) {
+	    while (baseConsonant > baseLimit) {
                     IndicOTCharClass charClass = indic_ot_get_char_class(class_table, chars[baseConsonant]);
 
                     if (IS_CONSONANT(charClass)) {
@@ -259,10 +259,6 @@ glong indic_ot_reorder(const gunichar *c
                     baseConsonant -= 1;
                 }
 
-                if (baseConsonant < baseLimit) {
-                    baseConsonant = baseLimit;
-                }
-
                 /* Write Mpre */
                 writeMpre(&output);
 
@@ -393,7 +389,6 @@ glong indic_ot_reorder(const gunichar *c
                 for (i = vmpost; i < syllable; i += 1) {
                     writeChar(&output, chars[i], /*i*/ prev, blwf_p);
                 }
-            }
 
             break;
         }
Index: indic-ot.h
===================================================================
RCS file: /cvs/gnome/pango/modules/indic/indic-ot.h,v
retrieving revision 1.3
diff -u -p -w -r1.3 indic-ot.h
--- indic-ot.h	15 Apr 2003 20:58:28 -0000	1.3
+++ indic-ot.h	1 Jun 2003 07:25:42 -0000
@@ -133,7 +133,7 @@ enum indic_glyph_property_
   rphf_p = (junk | dist),
   blwf_p = (junk | dist | rphf),
   half_p = (junk | dist | rphf | blwf),
-  nukt_p = (junk | dist | rphf | blwf | half)
+  nukt_p = (junk | dist | rphf | blwf | half | pstf)
 };
 
 /*
