diff -rup pango-1.28.1/modules/indic/indic-fc.c pango-1.28.1_/modules/indic/indic-fc.c
--- pango-1.28.1/modules/indic/indic-fc.c	2010-05-27 01:50:31.000000000 +0530
+++ pango-1.28.1_/modules/indic/indic-fc.c	2010-07-14 10:33:17.000000000 +0530
@@ -171,6 +171,7 @@ set_glyphs (PangoFont      *font,
 	  if (!glyph)
 	    glyph = PANGO_GET_UNKNOWN_GLYPH ( wcs[i]);
 	}
+		/*arjun printf("U+%04x: glyph %d (0x%x) tag 0x%x Cluster %d\n", wcs[i],glyph,glyph,tags[i],i); */
       pango_ot_buffer_add_glyph (buffer, glyph, tags[i], i);
     }
 }
@@ -219,14 +220,23 @@ indic_engine_shape (PangoEngineShape *en
   FT_Face face;
   PangoOTRulesetDescription desc;
   const PangoOTRuleset *ruleset;
-  PangoOTBuffer *buffer;
-  glong i, n_chars, n_glyphs;
+
+  PangoOTBuffer *buffer, *buffer_temp;
+  glong i, n_chars, n_glyphs_sy, syllable, char_count, prev = 0, n_glyphs = 0,n_glyphs_sum=0;
+
   gulong *tags = NULL;
-  gunichar *wc_in = NULL, *wc_out = NULL;
+  gunichar *wc_in = NULL, *wc_out = NULL, *wc_temp = NULL;
+
   glong *utf8_offsets = NULL;
   glong *indices = NULL;
   IndicEngineFc *indic_shape_engine = NULL;
   MPreFixups *mprefixups;
+    
+  PangoOTGlyph *glyphs_temp,glyphele;
+  int n_glyphs_temp;
+  GSList *indices_g = NULL;
+  //These are required to store the intermediate glyphs for the line after processing one syllable.
+  GSList  *glyphseq_glyph=NULL,*glyphseq_properties=NULL,*glyphseq_cluster=NULL;
 
   g_return_if_fail (font != NULL);
   g_return_if_fail (text != NULL);
@@ -242,21 +252,8 @@ indic_engine_shape (PangoEngineShape *en
 
   wc_in    = expand_text (text, length, &utf8_offsets, &n_chars);
 
-  n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_shape_engine->classTable, NULL, NULL, NULL, NULL);
-
-  wc_out  = g_new (gunichar, n_glyphs);
-  indices = g_new (glong,    n_glyphs);
-  tags    = g_new (gulong,   n_glyphs);
-
-  n_glyphs  = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_shape_engine->classTable, wc_out, indices, tags, &mprefixups);
-
-  pango_glyph_string_set_size (glyphs, n_glyphs);
   buffer = pango_ot_buffer_new (fc_font);
   pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
-
-  set_glyphs(font, wc_out, tags, n_glyphs, buffer,
-	     (indic_shape_engine->classTable->scriptFlags & SF_PROCESS_ZWJ) != 0);
-
   desc.script = analysis->script;
   desc.language = analysis->language;
 
@@ -270,34 +267,87 @@ indic_engine_shape (PangoEngineShape *en
   desc.other_features = NULL;
 
   ruleset = pango_ot_ruleset_get_for_description (pango_ot_info_get (face), &desc);
+ 
 
-  /* do gsub processing */
-  pango_ot_ruleset_substitute (ruleset, buffer);
-
-  /* Fix pre-modifiers for some scripts before base consonant */
-  if (mprefixups)
-    {
-      indic_mprefixups_apply (mprefixups, buffer);
-      indic_mprefixups_free (mprefixups);
+  while (prev < n_chars) { 
+      syllable = indic_ot_find_syllable(indic_shape_engine->classTable, wc_in, prev, n_chars);
+      char_count = syllable - prev;
+      wc_temp = g_new (gunichar, char_count);
+      for (i = 0; i < char_count; i++) {
+	          wc_temp[i] = wc_in[i + prev];	  
+      }
+
+      n_glyphs_sy = indic_ot_reorder (wc_temp, utf8_offsets, char_count, indic_shape_engine->classTable, NULL, NULL, NULL, NULL);
+      wc_out  = g_new (gunichar, n_glyphs_sy);
+      indices = g_new (glong,    n_glyphs_sy);
+      tags    = g_new (gulong,   n_glyphs_sy);
+
+      n_glyphs_sy  = indic_ot_reorder (wc_temp, utf8_offsets, char_count, indic_shape_engine->classTable, wc_out, indices, tags, &mprefixups);
+      for (i = 0; i < n_glyphs_sy; i++) {
+	           indices_g=g_slist_append(indices_g, GINT_TO_POINTER(indices[i]));
+      }
+
+      n_glyphs += n_glyphs_sy;
+      
+      buffer_temp = pango_ot_buffer_new (fc_font);
+      
+      set_glyphs(font, wc_out, tags, n_glyphs_sy, buffer_temp,
+        	(indic_shape_engine->classTable->scriptFlags & SF_PROCESS_ZWJ) != 0);
+
+      /* do gsub processing */
+      pango_ot_ruleset_substitute (ruleset, buffer_temp);
+
+      /* Fix pre-modifiers for some scripts before base consonant */
+      if (mprefixups)
+        {
+          indic_mprefixups_apply (mprefixups, buffer_temp);
+          indic_mprefixups_free (mprefixups);
+        }
+
+      /* do gpos processing */
+      pango_ot_ruleset_position (ruleset, buffer_temp);
+
+     pango_ot_buffer_get_glyphs (buffer_temp, &glyphs_temp, &n_glyphs_temp);
+        n_glyphs_sum+=n_glyphs_temp;
+      for (i = 0; i < n_glyphs_temp; i++) {
+		        glyphseq_glyph=g_slist_append(glyphseq_glyph, GINT_TO_POINTER(glyphs_temp[i].glyph));
+		        glyphseq_properties=g_slist_append(glyphseq_properties, GINT_TO_POINTER(glyphs_temp[i].glyph));
+		        glyphseq_cluster=g_slist_append(glyphseq_cluster, GINT_TO_POINTER(glyphs_temp[i].glyph));
+	      }
+ //         pango_ot_buffer_add_glyph (buffer, glyphs_temp[i].glyph, glyphs_temp[i].properties, glyphs_temp[i].cluster);
+       
+      prev = syllable;     
+      
+      pango_ot_buffer_destroy (buffer_temp);
+      g_free (wc_temp);
+      g_free (tags);
+      g_free (indices);
+      g_free (wc_out);
+ }
+
+	    for (i=0; i< n_glyphs_sum; i++) {
+		      glyphele.glyph= g_slist_nth_data(glyphseq_glyph,i);
+		      glyphele.properties=g_slist_nth_data(glyphseq_properties,i);
+	      glyphele.cluster= g_slist_nth_data(glyphseq_properties,i);
+														pango_ot_buffer_add_glyph (buffer,glyphele.glyph , glyphele.properties, glyphele.cluster);
     }
+									pango_glyph_string_set_size (glyphs, n_glyphs);
 
-  /* do gpos processing */
-  pango_ot_ruleset_position (ruleset, buffer);
-
-  pango_ot_buffer_output (buffer, glyphs);
-
-  /* Get the right log_clusters values */
-  for (i = 0; i < glyphs->num_glyphs; i += 1)
-    glyphs->log_clusters[i] = indices[glyphs->log_clusters[i]];
+     pango_ot_buffer_output (buffer, glyphs); 
 
+     /* Get the right log_clusters values */
+     for (i = 0; i < glyphs->num_glyphs; i += 1)
+         glyphs->log_clusters[i] = g_slist_nth_data( indices_g, glyphs->log_clusters[i]);
+ 
   pango_fc_font_unlock_face (fc_font);
 
   pango_ot_buffer_destroy (buffer);
-  g_free (tags);
-  g_free (indices);
-  g_free (wc_out);
+  g_slist_free(indices_g);
   g_free (wc_in);
   g_free (utf8_offsets);
+	 g_slist_free(glyphseq_glyph);
+	 g_slist_free(glyphseq_properties);
+	 g_slist_free(glyphseq_cluster);
 }
 
 static void
