diff -uNr pango_origin/pango/pango-layout.c pango_modify/pango/pango-layout.c
--- pango_origin/pango/pango-layout.c	2006-02-13 10:20:54.000000000 +0800
+++ pango_modify/pango/pango-layout.c	2006-02-13 14:49:45.000000000 +0800
@@ -944,6 +944,44 @@
   g_free (text);
 }
 
+int
+pango_layout_get_unknown_glyphs(PangoLayout *layout)
+{
+    PangoLayoutLine *line;
+    PangoLayoutRun *run;
+    GSList *lines_list;
+    GSList *runs_list;
+    int i, count = 0;
+
+    g_return_if_fail (PANGO_IS_LAYOUT (layout));
+
+    if (!layout->lines)    
+        pango_layout_check_lines (layout);
+    
+    lines_list = layout->lines;
+    while (lines_list)
+      {
+        line = lines_list->data;
+        runs_list = line->runs;
+        
+        while (runs_list)
+          {
+            run = runs_list->data;
+            
+            for (i = 0; i < run->glyphs->num_glyphs; i++)
+              {
+                if (run->glyphs->glyphs[i].glyph & PANGO_GLYPH_UNKNOWN_FLAG)
+                    count++;
+              }
+
+            runs_list = runs_list->next;
+          }
+        lines_list = lines_list->next;
+      } 
+
+    return count; 
+}
+
 /**
  * pango_layout_context_changed:
  * @layout: a #PangoLayout
diff -uNr pango_origin/pango/pango-layout.h pango_modify/pango/pango-layout.h
--- pango_origin/pango/pango-layout.h	2005-11-05 07:55:37.000000000 +0800
+++ pango_modify/pango/pango-layout.h	2006-02-13 14:49:50.000000000 +0800
@@ -154,6 +154,7 @@
 					       PangoEllipsizeMode  ellipsize);
 PangoEllipsizeMode pango_layout_get_ellipsize (PangoLayout        *layout);
 
+int            pango_layout_get_unknown_glyphs (PangoLayout       *layout);
 void           pango_layout_context_changed (PangoLayout    *layout);
 
 void     pango_layout_get_log_attrs (PangoLayout    *layout,
