On Wed, Apr 7, 2010 at 4:43 PM, Neil Roberts <[email protected]> wrote:
>
> You can't call the cogl_pango_* functions using a layout created with a
> regular pango context - instead it has to be a context created with the
> special Cogl font map. The cogl_pango functions in cogl-pango.h are
> meant to be public so it is safe to use them. The lack of documentation
> is an oversight not an attempt to hide them.
>
> The usual way to paint custom text in an actor is to call
> clutter_actor_create_pango_layout() and then render it with
> cogl_pango_render_layout(). This will take advantage of the CoglPango
> glyph cache and render the text from textures so it should be relatively
> efficient.
>
> Hope that helps
>
> - Neil
>

I did as you said, and it works :)

Actually, just out of curiosity, I also tried to create the Pango
context like this

    PangoFontMap *lPangoFontMap = cogl_pango_font_map_new();
    PangoContext *lPangoCtx = pango_font_map_create_context(lPangoFontMap);

and it also works.

Thanks to everyone who answered :)

O.
-- 
To unsubscribe send a mail to [email protected]

Reply via email to