diff -ruN -x CVS pango.orig/configure.in pango/configure.in
--- pango.orig/configure.in	2006-10-03 03:13:50.000000000 +0900
+++ pango/configure.in	2006-10-04 17:14:16.000000000 +0900
@@ -398,7 +398,7 @@
 basic_modules="basic-fc,basic-win32,basic-x,basic-atsui"
 hangul_modules="hangul-fc"
 hebrew_modules="hebrew-fc"
-indic_modules="indic-fc"
+indic_modules="indic-fc,indic-lang"
 khmer_modules="khmer-fc"
 syriac_modules="syriac-fc"
 thai_modules="thai-fc"
@@ -480,6 +480,7 @@
 AM_CONDITIONAL(INCLUDE_HANGUL_FC,	echo $included_modules | egrep '(^|,)hangul-fc($|,)' 	> /dev/null)
 AM_CONDITIONAL(INCLUDE_HEBREW_FC,	echo $included_modules | egrep '(^|,)hebrew-fc($|,)' 	> /dev/null)
 AM_CONDITIONAL(INCLUDE_INDIC_FC,	echo $included_modules | egrep '(^|,)indic-fc($|,)' 	> /dev/null)
+AM_CONDITIONAL(INCLUDE_INDIC_LANG,	echo $included_modules | egrep '(^|,)indic-lang($|,)'	> /dev/null)
 AM_CONDITIONAL(INCLUDE_KHMER_FC,	echo $included_modules | egrep '(^|,)khmer-fc($|,)' 	> /dev/null)
 AM_CONDITIONAL(INCLUDE_SYRIAC_FC,	echo $included_modules | egrep '(^|,)syriac-fc($|,)' 	> /dev/null)
 AM_CONDITIONAL(INCLUDE_THAI_FC,		echo $included_modules | egrep '(^|,)thai-fc($|,)' 	> /dev/null)
@@ -494,6 +495,7 @@
 AM_CONDITIONAL(DYNAMIC_HANGUL_FC,	echo $dynamic_modules | egrep '(^|,)hangul-fc($|,)'	> /dev/null)
 AM_CONDITIONAL(DYNAMIC_HEBREW_FC,	echo $dynamic_modules | egrep '(^|,)hebrew-fc($|,)' 	> /dev/null)
 AM_CONDITIONAL(DYNAMIC_INDIC_FC,	echo $dynamic_modules | egrep '(^|,)indic-fc($|,)' 	> /dev/null)
+AM_CONDITIONAL(DYNAMIC_INDIC_LANG,	echo $dynamic_modules | egrep '(^|,)indic-lang($|,)'	> /dev/null)
 AM_CONDITIONAL(DYNAMIC_KHMER_FC,	echo $dynamic_modules | egrep '(^|,)khmer-fc($|,)' 	> /dev/null)
 AM_CONDITIONAL(DYNAMIC_SYRIAC_FC,	echo $dynamic_modules | egrep '(^|,)syriac-fc($|,)' 	> /dev/null)
 AM_CONDITIONAL(DYNAMIC_THAI_FC,		echo $dynamic_modules | egrep '(^|,)thai-fc($|,)' 	> /dev/null)
diff -ruN -x CVS pango.orig/modules/indic/Makefile.am pango/modules/indic/Makefile.am
--- pango.orig/modules/indic/Makefile.am	2006-02-14 04:03:37.000000000 +0900
+++ pango/modules/indic/Makefile.am	2006-10-04 17:14:16.000000000 +0900
@@ -24,3 +24,21 @@
 pango_indic_fc_la_SOURCES = $(fc_sources)
 libpango_indic_fc_la_SOURCES = $(fc_sources)
 libpango_indic_fc_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_indic_fc
+
+
+if INCLUDE_INDIC_LANG
+noinst_LTLIBRARIES += libpango-indic-lang.la
+else
+if DYNAMIC_INDIC_LANG
+module_LTLIBRARIES += pango-indic-lang.la
+endif
+endif
+
+lang_sources =		\
+	indic-lang.c
+
+pango_indic_lang_la_LDFLAGS = -module $(MODULE_LIBTOOL_OPTIONS)
+pango_indic_lang_la_LIBADD = $(pangolibs)
+pango_indic_lang_la_SOURCES = $(lang_sources)
+libpango_indic_lang_la_SOURCES = $(lang_sources)
+libpango_indic_lang_la_CFLAGS = -DPANGO_MODULE_PREFIX=_pango_indic_lang
diff -ruN -x CVS pango.orig/modules/indic/indic-lang.c pango/modules/indic/indic-lang.c
--- pango.orig/modules/indic/indic-lang.c	1970-01-01 09:00:00.000000000 +0900
+++ pango/modules/indic/indic-lang.c	2006-10-05 16:01:15.000000000 +0900
@@ -0,0 +1,165 @@
+/* Pango
+ * indic-lang.c:
+ *
+ * Copyright (C) 2006 Red Hat Software
+ * Author: Akira TAGOH <tagoh@redhat.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <config.h>
+#include <string.h>
+
+#include "pango-engine.h"
+#include "pango-break.h"
+
+typedef PangoEngineLang	IndicEngineLang;
+typedef PangoEngineLangClass	IndicEngineLangClass;
+
+#define ENGINE_SUFFIX		"IndicScriptEngineLang"
+#define RENDER_TYPE		PANGO_RENDER_TYPE_NONE
+#define INDIC_ENGINE_INFO(script)					\
+  {#script ENGINE_SUFFIX, PANGO_ENGINE_TYPE_LANG, RENDER_TYPE, script##_scripts, G_N_ELEMENTS(script##_scripts)}
+
+
+static PangoEngineScriptInfo deva_scripts[] = {
+  { PANGO_SCRIPT_DEVANAGARI, "*" }
+};
+
+static PangoEngineScriptInfo sinh_scripts[] = {
+  { PANGO_SCRIPT_SINHALA, "*" }
+};
+
+static PangoEngineInfo script_engines[] = {
+  INDIC_ENGINE_INFO(deva),
+  INDIC_ENGINE_INFO(sinh)
+};
+
+
+static void
+indic_engine_break (PangoEngineLang *engine,
+		    const char      *text,
+		    int              length,
+		    PangoAnalysis   *analysis,
+		    PangoLogAttr    *attrs,
+		    int              attrs_len)
+{
+  const gchar *p, *next = NULL, *next_next;
+  gunichar prev_wc, this_wc, next_wc, next_next_wc;
+  gboolean makes_rephaya_syllable = FALSE;
+  int i;
+
+  for (p = text, prev_wc = 0, i = 0;
+       p != NULL && p < (text + length);
+       p = next, prev_wc = this_wc, i++)
+    {
+      this_wc = g_utf8_get_char (p);
+      next = g_utf8_next_char (p);
+      if (next != NULL && next < (text + length))
+	{
+	  next_wc = g_utf8_get_char (next);
+	  next_next = g_utf8_next_char (next);
+	}
+      else
+	{
+	  next_wc = 0;
+	  next_next = NULL;
+	}
+      if (next_next != NULL && next_next < (text + length))
+	next_next_wc = g_utf8_get_char (next_next);
+      else
+	next_next_wc = 0;
+
+      if (prev_wc != 0 && this_wc == 0x0DBB &&
+	  next_wc == 0x0DCA && next_next_wc == 0x200D)
+	{
+	  /* Determine whether or not this forms a Rephaya syllable.
+	   * SINHALA LETTER + U+0DBB U+0DCA U+200D + SINHALA LETTER is
+	   * the kind of Rephaya.
+	   */
+	  makes_rephaya_syllable = TRUE;
+	  attrs[i].is_cursor_position = FALSE;
+	  attrs[i].is_char_break = FALSE;
+	  attrs[i].is_line_break = FALSE;
+	  attrs[i].is_mandatory_break = FALSE;
+	}
+      else if (prev_wc == 0x200D &&
+		(makes_rephaya_syllable || this_wc == 0x0DBB || this_wc == 0x0DBA))
+	{
+	  /* fixes the cursor break in Sinhala.
+	   * SINHALA LETTER + SINHALA VOWEL + ZWJ + 0x0DBB/0x0DBA is
+	   * the kind of Rakaransaya/Yansaya. these characters has to
+	   * be dealt as one character.
+	   */
+	  attrs[i].is_cursor_position = FALSE;
+	  attrs[i].is_char_break = FALSE;
+	  attrs[i].is_line_break = FALSE;
+	  attrs[i].is_mandatory_break = FALSE;
+	  makes_rephaya_syllable = FALSE;
+	}
+      else if (this_wc == 0x200D &&
+		((makes_rephaya_syllable && next_wc != 0) ||
+		 (next_wc == 0x0DBB || next_wc == 0x0DBA)))
+	{
+	  attrs[i].is_cursor_position = FALSE;
+	  attrs[i].is_char_break = FALSE;
+	  attrs[i].is_line_break = FALSE;
+	  attrs[i].is_mandatory_break = FALSE;
+	}
+    }
+}
+
+static void
+indic_engine_lang_class_init (PangoEngineLangClass *klass)
+{
+  klass->script_break = indic_engine_break;
+}
+
+PANGO_ENGINE_LANG_DEFINE_TYPE (IndicEngineLang, indic_engine_lang,
+			       indic_engine_lang_class_init, NULL)
+
+void
+PANGO_MODULE_ENTRY(init) (GTypeModule *module)
+{
+  indic_engine_lang_register_type (module);
+}
+
+void
+PANGO_MODULE_ENTRY(exit) (void)
+{
+}
+
+void
+PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines,
+			  int               *n_engines)
+{
+  *engines = script_engines;
+  *n_engines = G_N_ELEMENTS (script_engines);
+}
+
+PangoEngine *
+PANGO_MODULE_ENTRY(create) (const char *id)
+{
+  guint i;
+
+  for (i = 0; i < G_N_ELEMENTS(script_engines); i++)
+    {
+      if (!strcmp (id, script_engines[i].id))
+	return g_object_new (indic_engine_lang_type, NULL);
+    }
+
+  return NULL;
+}
