Index: clutter/pango/pangoclutter-render.c
===================================================================
--- clutter/pango/pangoclutter-render.c	(revision 3353)
+++ clutter/pango/pangoclutter-render.c	(working copy)
@@ -55,6 +55,9 @@
   PangoClutterGlyphCache *mipmapped_glyph_cache;
 
   gboolean use_mipmapping;
+
+  gboolean outline;
+  gfloat outline_width;
 };
 
 struct _PangoClutterRendererClass
@@ -96,6 +99,8 @@
   priv->glyph_cache = pango_clutter_glyph_cache_new (FALSE);
   priv->mipmapped_glyph_cache = pango_clutter_glyph_cache_new (TRUE);
   priv->use_mipmapping = FALSE;
+  priv->outline = FALSE;
+  priv->outline_width = 0.0f;
 }
 
 static void
@@ -129,7 +134,9 @@
 				      int           x,
 				      int           y,
 				      ClutterColor *color,
-				      int           flags)
+				      int           flags,
+				      gboolean      outline,
+				      gfloat        outline_width)
 {
   PangoContext         *context;
   PangoFontMap         *font_map;
@@ -144,6 +151,8 @@
   priv = PANGO_CLUTTER_RENDERER (renderer);
 
   priv->color = *color;
+  priv->outline = outline;
+  priv->outline_width = outline_width;
 
   pango_renderer_draw_layout (renderer, layout, x, y);
 }
@@ -153,20 +162,26 @@
 			     int           x,
 			     int           y,
 			     ClutterColor *color,
-			     int           flags)
+			     int           flags,
+			     gboolean      outline,
+			     gfloat        outline_width)
 {
   pango_clutter_render_layout_subpixel (layout,
                                         x * PANGO_SCALE,
                                         y * PANGO_SCALE,
                                         color,
-                                        flags);
+                                        flags,
+					outline,
+					outline_width);
 }
 
 void
 pango_clutter_render_layout_line (PangoLayoutLine  *line,
 				  int               x,
 				  int               y,
-				  ClutterColor     *color)
+				  ClutterColor     *color,
+				  gboolean         outline,
+				  gfloat           outline_width)
 {
   PangoContext         *context;
   PangoFontMap         *font_map;
@@ -181,6 +196,8 @@
   priv = PANGO_CLUTTER_RENDERER (renderer);
 
   priv->color = *color;
+  priv->outline = outline;
+  priv->outline_width = outline_width;
 
   pango_renderer_draw_layout_line (renderer, line, x, y);
 }
@@ -219,20 +236,33 @@
 
   if ((value = pango_clutter_glyph_cache_lookup (glyph_cache,
 						 font,
-						 glyph)) == NULL)
+						 glyph,
+						 priv->outline,
+						 priv->outline_width)) == NULL)
     {
       cairo_surface_t *surface;
       cairo_t *cr;
       cairo_scaled_font_t *scaled_font;
       PangoRectangle ink_rect;
       cairo_glyph_t cairo_glyph;
+      gint width;
+      gint height;
 
       pango_font_get_glyph_extents (font, glyph, &ink_rect, NULL);
       pango_extents_to_pixels (&ink_rect, NULL);
 
+      width = ink_rect.width;
+      height = ink_rect.height;
+
+      if (priv->outline)
+	{
+	  width += (gint)(priv->outline_width + 0.5f) * 2;
+	  height += (gint)(priv->outline_width + 0.5f) * 2;
+	}
+
       surface = cairo_image_surface_create (CAIRO_FORMAT_A8,
-					    ink_rect.width,
-					    ink_rect.height);
+					    width,
+					    height);
       cr = cairo_create (surface);
 
       scaled_font = pango_cairo_font_get_scaled_font (PANGO_CAIRO_FONT (font));
@@ -240,11 +270,28 @@
 
       cairo_glyph.x = -ink_rect.x;
       cairo_glyph.y = -ink_rect.y;
+
+      if (priv->outline)
+	{
+	  cairo_glyph.x += (gint)priv->outline_width;
+	  cairo_glyph.y += (gint)priv->outline_width;
+	}
+
       /* The PangoCairo glyph numbers directly map to Cairo glyph
 	 numbers */
       cairo_glyph.index = glyph;
-      cairo_show_glyphs (cr, &cairo_glyph, 1);
 
+      if (priv->outline == FALSE)
+	{
+	  cairo_show_glyphs (cr, &cairo_glyph, 1);
+	}
+      else
+	{
+	  cairo_glyph_path (cr, &cairo_glyph, 1);
+	  cairo_set_line_width (cr, priv->outline_width);
+	  cairo_stroke (cr);
+	}
+
       cairo_destroy (cr);
       cairo_surface_flush (surface);
 
@@ -255,7 +302,8 @@
 	 cairo_image_surface_get_width (surface),
 	 cairo_image_surface_get_height (surface),
 	 cairo_image_surface_get_stride (surface),
-	 ink_rect.x, ink_rect.y);
+	 ink_rect.x, ink_rect.y,
+	 priv->outline, priv->outline_width);
 
       cairo_surface_destroy (surface);
 
