Hi,<br><br>I am working on pango and using cairo as a rendering backend. I wrote a small program using some pango-cairo layout functions. The problem is that even when I am able to compile the program successfully on an FC5 machine, it does not show anything on screen. below is the code.<br>
<br>  <span style="color: rgb(153, 0, 0);">   #include &lt;pango/pango.h&gt;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        #include &lt;pango/pangocairo.h&gt;</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">        //#include &lt;cairo/cairo.h&gt;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        #define FONT &quot;Sans Bold 20&quot;</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        int main (int argc, char *argv[]){</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        PangoFontMap *fontmap;</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">        PangoContext *context;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        PangoLayout *layout;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        PangoFontDescription *font_desc;</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">        const char * text = &quot;Display text in Arabic \330\247\331\204\330\263\331\204\330\271\331\204\331\212\331\203\331\205\n&quot;;</span><br style="color: rgb(153, 0, 0);"><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">        cairo_surface_t  *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,0,0);</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        cairo_t *cr = cairo_create (surface);</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">        cairo_set_source_rgb (cr,0.0,0.0,0.0);</span><br style="color: rgb(153, 0, 0);"><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        font_desc = pango_font_description_from_string(FONT);</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        //fontmap = pango_cairo_font_map_get_default();</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        //context = pango_cairo_font_map_create_context((PangoCairoFontMap *)fontmap);</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        layout = pango_cairo_create_layout(cr);</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        pango_layout_set_text (layout, text, -1);</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">        pango_layout_set_font_description (layout, font_desc);</span><br style="color: rgb(153, 0, 0);"><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        pango_font_description_free(font_desc);</span><br style="color: rgb(153, 0, 0);">
<br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        pango_cairo_show_layout(cr,layout);</span><br style="color: rgb(153, 0, 0);"><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        g_print(&quot;Last line!&quot;);</span><br style="color: rgb(153, 0, 0);">
<span style="color: rgb(153, 0, 0);">        return 0;</span><br style="color: rgb(153, 0, 0);"><span style="color: rgb(153, 0, 0);">        }</span><br><br><font color="#000000">Can anyone point out what am I missing? </font>Thanks in advance.<br>
<br clear="all"><br>-- <br>Regards,<br>Rabia<br>