--- pango-1.17.4/modules/hangul/hangul-fc.c.old	2007-07-25 16:45:57.190147000 +0800
+++ pango-1.17.4/modules/hangul/hangul-fc.c	2007-07-25 16:29:51.165056000 +0800
@@ -403,7 +403,9 @@
 		     const PangoAnalysis *analysis,
 		     PangoGlyphString *glyphs)
 {
-  int n_chars = g_utf8_strlen (text, length);
+  PangoFcFont *fc_font;
+  FT_Face face;
+  int n_chars; 
   int n_glyphs;
   int i;
   const char *p, *start;
@@ -411,6 +413,17 @@
   int n_jamos;
   gunichar prev = 0;
 
+  g_return_if_fail (font != NULL);
+  g_return_if_fail (text != NULL);
+  g_return_if_fail (length >= 0);
+  g_return_if_fail (analysis != NULL);
+
+  fc_font = PANGO_FC_FONT (font);
+  face = pango_fc_font_lock_face (fc_font);
+  if (!face)
+    return;
+
+  n_chars = g_utf8_strlen (text, length);
   n_glyphs = 0;
   start = p = text;
   n_jamos = 0;
@@ -458,6 +471,7 @@
   else if (n_jamos > 0)
     render_syllable (font, start, n_jamos, glyphs, &n_glyphs,
 		     start - text);
+  pango_fc_font_unlock_face (fc_font);
 }
 
 static void
