+/* Return the width (in pixels) of an upper case M when rendered in the
+ current font of W
+*/
+static gint
+width_of_m (GtkWidget *w)
+{
+ PangoRectangle rect;
+ PangoLayout *layout = gtk_widget_create_pango_layout (w, "M");
+
+ pango_layout_get_pixel_extents (layout, NULL, &rect);
+
+ g_object_unref (layout);
+
+ return rect.width;
+}
+