4b7c040
diff --git a/src/cheese-effect-chooser.c b/src/cheese-effect-chooser.c
4b7c040
index 8716117..61aeacb 100644
4b7c040
--- a/src/cheese-effect-chooser.c
4b7c040
+++ b/src/cheese-effect-chooser.c
4b7c040
@@ -178,18 +178,20 @@ cheese_cairo_draw_card (cairo_t *cr, const GstEffect *card, gboolean highlight)
4b7c040
   if (card->is_black)
4b7c040
     cairo_set_source_rgb (cr, 1, 1, 1);
4b7c040
 
4b7c040
-  double x, y;
4b7c040
-  cairo_select_font_face (cr, "Sans",
4b7c040
-                          CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
4b7c040
-
4b7c040
-  cairo_set_font_size (cr, 0.09);
4b7c040
+  PangoLayout *layout = pango_cairo_create_layout (cr);
4b7c040
   gchar *name = gettext (card->name);
4b7c040
-  cairo_text_extents (cr, name, &extents);
4b7c040
-  x = 0.5 - (extents.width / 2 + extents.x_bearing);
4b7c040
-  y = 0.92 - (extents.height / 2 + extents.y_bearing);
4b7c040
-
4b7c040
+  pango_layout_set_text (layout, name, -1);
4b7c040
+  PangoFontDescription *desc = pango_font_description_from_string ("Sans 0.09");
4b7c040
+  pango_layout_set_font_description (layout, desc);
4b7c040
+  pango_font_description_free (desc);
4b7c040
+  int width, height;
4b7c040
+  pango_layout_get_size (layout, &width, &height);
4b7c040
+  double x, y;
4b7c040
+  x = 0.5 - ((double)width / PANGO_SCALE) / 2;
4b7c040
+  y = 0.92 - ((double)height / PANGO_SCALE) / 2;
4b7c040
   cairo_move_to (cr, x, y);
4b7c040
-  cairo_show_text (cr, name);
4b7c040
+  pango_cairo_show_layout (cr, layout);
4b7c040
+  g_object_unref (layout);
4b7c040
 
4b7c040
   if (highlight)
4b7c040
   {