Thanks for clarifying. Actually, I have to use Pango independently of a higher level library like GTK. Does pango-with-cairo support opentype fonts?<br><br><div class="gmail_quote">On Fri, Jun 26, 2009 at 5:12 PM, M Joonas Pihlaja <span dir="ltr"><<a href="mailto:jpihlaja@cc.helsinki.fi">jpihlaja@cc.helsinki.fi</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Fri, 26 Jun 2009, Rabia Sirhindi wrote:<br>
<br>
> I am working on pango and using cairo as a rendering backend. I wrote a<br>
> small program using some pango-cairo layout functions. The problem is that<br>
> even when I am able to compile the program successfully on an FC5 machine,<br>
> it does not show anything on screen. below is the code.<br>
<br>
</div>[snip code]<br>
<div class="im"><br>
> cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,0,0);<br>
<br>
</div>This line creates an image surface without any width or height. An<br>
image surface represents an array of pixels in memory only and it is<br>
never displayed by cairo onto a screen or window. You probably want a<br>
platform specific surface such as an xlib surface or something<br>
similar. For example, GDK has a gdk_cairo_create() function to create<br>
a cairo context for a window. Alternately, you could use<br>
cairo_surface_write_to_png() at the end of your code and use an image<br>
viewer to display the rendered results.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
Joonas<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Rabia<br>