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	20 Oct 2002 09:43:59 -0000
@@ -34,6 +34,7 @@
 static PangoEngineRange hangul_ranges[] = {
   /* Language characters */
   { 0x1100, 0x11FF, "*" }, /* Hangul Jamo */
+  { 0x302e, 0x302f, "*" }, /* Hangul Tone Marks */
 };
 
 static PangoEngineInfo script_engines[] = {
@@ -62,12 +63,45 @@
 #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 : 0x302e => '·', 0x302f => ':' */
+      index = find_char(font, tone == 0x302e ? 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)
 {
   int index;
   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;
