Text Antoine de Saint-Exupery A rock pile ceases to be a rock pile the moment a single man contemplates it, bearing within him the image of a cathedral.
Introduction
Drawing a shadow under the text
Problem You want to draw a shadow under the text displayed by a ClutterText actor.
Solution Override the paint signal of ClutterText and use the CoglPango API to paint the PangoLayout of the actor with the color of the shadow at a given offset. A ClutterText actor painting a shadow underneath its contents
Discussion The ClutterText class provides an actor that transforms the PangoLayout object into an element of the Clutter scene graph. The underlying layout is painted, though, through a subset of the Cogl API, called CoglPango. It is possible to paint PangoLayout created by a ClutterText by invoking cogl_pango_render_layout(): This function will paint the layout at the given offsets using the provided color. The cogl_pango_render_layout() function will only work with PangoLayouts created by Clutter. Since the shadow of the text is literally the same text but painted with a different color and at an offset, we can use the paint signal of ClutterText to paint the shadow, and then let ClutterText paint its contents on top: Note that we are using the PangoLayout of the ClutterText because the ClutterText actor always keeps an updated layout internally. It is, however, possible for any ClutterActor to create a PangoLayout using clutter_actor_create_pango_layout(), and then paint that layout using cogl_pango_render_layout() in their implementation of the paint virtual function.
Full example Creating a shadow of a text FIXME: MISSING XINCLUDE CONTENT