Index: hangul-defs.h
===================================================================
RCS file: /cvs/gnome/pango/modules/hangul/hangul-defs.h,v
retrieving revision 1.1
diff -u -r1.1 hangul-defs.h
--- hangul-defs.h	31 Jul 2002 19:08:14 -0000	1.1
+++ hangul-defs.h	21 Oct 2002 13:02:28 -0000
@@ -46,9 +46,14 @@
 #define VFILL 0x1160
 #define TFILL 0x11A7
 
+#define HTONE1 0x302E
+#define HTONE2 0x302F
+
 #define IS_L(wc) (wc >= LBASE && wc <= LEND)
 #define IS_V(wc) (wc >= VFILL && wc <= VEND)
 #define IS_T(wc) (wc >= TBASE && wc <= TEND)
+#define IS_M(wc) ((wc) == HTONE1 || (wc) == HTONE2)
+
 
 /* jamo which can be composited as a Hangul syllable */
 #define IS_L_S(wc) (wc >= LBASE && wc < LBASE + LCOUNT)
Index: hangul-xft.c
===================================================================
RCS file: /cvs/gnome/pango/modules/hangul/hangul-xft.c,v
retrieving revision 1.4
diff -u -r1.4 hangul-xft.c
--- hangul-xft.c	15 Oct 2002 09:50:26 -0000	1.4
+++ hangul-xft.c	21 Oct 2002 13:02:29 -0000
@@ -34,6 +34,7 @@
 static PangoEngineRange hangul_ranges[] = {
   /* Language characters */
   { 0x1100, 0x11FF, "*" }, /* Hangul Jamo */
+  { HTONE1, HTONE2, "*" }, /* Hangul Tone Marks */
 };
 
 static PangoEngineInfo script_engines[] = {
@@ -62,6 +63,29 @@
 #define find_char pango_xft_font_get_glyph
 
 static void
+render_tone (PangoFont *font, gunichar tone, PangoGlyphString *glyphs, 
+             int *n_glyphs, int cluster_offset)
+{
+  int index;
+
+  index = find_char(font, tone);
+  pango_glyph_string_set_size (glyphs, *n_glyphs + 1);
+  if (index)
+    set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);
+  else 
+    {  /* fall back : HTONE1(0x302e) => '·', HTONE2(0x302f) => ':' */
+      index = find_char(font, tone == HTONE1 ? 0x00b7 : 0x003a);
+      if (index)
+        set_glyph (font, glyphs, *n_glyphs, cluster_offset, index);
+      else 
+        set_glyph (font, glyphs, *n_glyphs, cluster_offset,
+      pango_xft_font_get_unknown_glyph (font, index));
+    }
+  (*n_glyphs)++;
+}
+
+
+static void
 render_syllable (PangoFont *font, gunichar *text, int length,
 		 PangoGlyphString *glyphs, int *n_glyphs, int cluster_offset)
 {
@@ -69,6 +93,16 @@
   gunichar wc;
   int i, j, composed;
 
+
+  /* tone mark has to be rendered to the left of a syllable */
+
+  wc = text[length-1];
+  if (IS_M (wc)) 
+    {
+       render_tone(font, wc, glyphs, n_glyphs, cluster_offset);
+       length--;
+    }
+
   if (length >= 3 && IS_L_S(text[0]) && IS_V_S(text[1]) && IS_T_S(text[2]))
     composed = 3;
   else if (length >= 2 && IS_L_S(text[0]) && IS_V_S(text[1]))
@@ -157,7 +191,8 @@
       if (n_jamos != 0 &&
 	  ((IS_T (jamos[n_jamos - 1]) && IS_L (wc)) ||
 	   (IS_V (jamos[n_jamos - 1]) && IS_L (wc)) ||
-	   (IS_T (jamos[n_jamos - 1]) && IS_V (wc))))
+	   (IS_T (jamos[n_jamos - 1]) && IS_V (wc)) ||
+	   (IS_M (jamos[n_jamos - 1]) && (IS_L (wc) || IS_V (wc) || IS_T (wc)))))
 	{
 	  /* Draw a syllable. */
 	  render_syllable (font, jamos, n_jamos, glyphs,
@@ -201,6 +236,9 @@
      _exactly_, I sure.  */
   for (i = 0x1100; i <= 0x11FF; i++)
     pango_coverage_set (result, i, PANGO_COVERAGE_FALLBACK);
+  pango_coverage_set (result, HTONE1, PANGO_COVERAGE_FALLBACK);
+  pango_coverage_set (result, HTONE2, PANGO_COVERAGE_FALLBACK);
+
   return result;
 }
 
