Index: gucharmap/gucharmap-charmap.c
===================================================================
--- gucharmap/gucharmap-charmap.c	(revision 1366)
+++ gucharmap/gucharmap-charmap.c	(working copy)
@@ -280,7 +280,109 @@
   g_free (decomposition);
 }
 
+/* returns the font family of the last glyph item in the first line of the
+ * layout; should be freed by caller */
+/* duplicated from gucharmap-table.c, must be unified */
+static gchar *
+get_font (PangoLayout *layout)
+{
+  PangoLayoutLine *line;
+  PangoGlyphItem *glyph_item;
+  PangoFont *font;
+  GSList *run_node;
+  gchar *family;
+  PangoFontDescription *font_desc;
+
+  line = pango_layout_get_line (layout, 0);
+
+  /* get to the last glyph_item (the one with the character we're drawing */
+  for (run_node = line->runs;  
+       run_node && run_node->next;  
+       run_node = run_node->next);
+
+  if (run_node)
+    {
+      glyph_item = run_node->data;
+      font = glyph_item->item->analysis.font;
+      font_desc = pango_font_describe (font);
+
+      family = g_strdup (pango_font_description_get_family (font_desc));
+
+      pango_font_description_free (font_desc);
+    }
+  else
+    family = NULL;
+
+  return family;
+}
+
 static void
+insert_glyph_versions (GucharmapCharmap *charmap,
+                       const gchar *glyph,
+                       gint glyph_len,
+		       GtkTextBuffer *buffer,
+		       GtkTextIter *iter)
+{
+  PangoFontFamily **families;
+  gint n_families, i;
+  PangoFontDescription *font_desc;
+  GHashTable *actual_families_uniq;
+  GList *actual_families, *lp;
+  gint default_font_size;
+
+  actual_families_uniq = g_hash_table_new (g_str_hash, g_str_equal);
+  font_desc = pango_font_description_new ();
+  pango_context_list_families (
+          gtk_widget_get_pango_context (GTK_WIDGET (charmap->details)),
+          &families, &n_families);
+  for (i = 0; i < n_families; i ++)
+    {
+      gchar *family_name;
+      gchar *actual_family;
+      PangoLayout *layout;
+
+      family_name = pango_font_family_get_name (families[i]);
+      pango_font_description_set_family (font_desc, family_name);
+      layout = gtk_widget_create_pango_layout (charmap->details, NULL);
+      pango_layout_set_font_description (layout, font_desc);
+      pango_layout_set_text (layout, glyph, glyph_len);
+      actual_family = get_font (layout);
+      g_object_unref (layout);
+      if (actual_family != NULL &&
+          g_hash_table_lookup (actual_families_uniq, actual_family) == NULL)
+        g_hash_table_insert (actual_families_uniq,
+                actual_family, GUINT_TO_POINTER (1));
+      else
+        g_free(actual_family);
+    }
+  pango_font_description_free (font_desc);
+
+  actual_families = g_hash_table_get_keys(actual_families_uniq);
+  g_hash_table_destroy (actual_families_uniq);
+  actual_families = g_list_sort (actual_families, g_utf8_collate);
+  insert_heading (charmap, buffer, iter, _("Available versions"));
+  default_font_size = pango_font_description_get_size (
+          GTK_WIDGET (charmap)->style->font_desc);
+  for (lp = actual_families; lp != NULL; lp = lp->next)
+    {
+      gchar *family = lp->data;
+      GtkTextTag *tag;
+
+      tag = gtk_text_buffer_create_tag (buffer, NULL, 
+                                        "size", 4 * default_font_size,
+                                        "family", family,
+                                        NULL);
+      gtk_text_buffer_insert_with_tags (buffer, iter, glyph, glyph_len,
+                                        tag, NULL);
+      gtk_text_buffer_insert (buffer, iter, ": ", -1);
+      gtk_text_buffer_insert (buffer, iter, family, -1);
+      gtk_text_buffer_insert (buffer, iter, "\n", -1);
+      g_free(family);
+    }
+  g_list_free(actual_families);
+}
+
+static void
 set_details (GucharmapCharmap *charmap,
              gunichar uc)
 {
@@ -479,6 +581,7 @@
                                _("Korean Pronunciation:"), csp);
     }
 #endif /* #if ENABLE_UNIHAN */
+  insert_glyph_versions (charmap, buf, n, buffer, &iter);
 }
 
 static void
