[cairo] can't render text

Uli Schlachter psychon at znc.in
Thu Nov 1 01:15:05 PDT 2012


Hi,

On 31.10.2012 17:17, Techie Help wrote:
[...]
> I am using following code:
> 
> Please let me know, what I am doing wrong.
> <code>
> cairo_select_font_face (cr, "monospace", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAl);
> 
>     cairo_set_font_size (cr, 14);
> 
>     cairo_set_source_rgb (cr, 0, 0, 0);
> 
>     cairo_move_to (cr, 0, 50);
> 
>     cairo_show_text (cr, "Print Something");
> </code>

Let's turn this into a full, self-contained example (attached). When I compile
and run this code, I get a file called "out.png" which shows the text "Print
Something".

So you aren't doing anything wrong.

Uli
-- 
A learning experience is one of those things that say,
'You know that thing you just did? Don't do that.'
                     -- Douglas Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.c
Type: text/x-csrc
Size: 631 bytes
Desc: not available
URL: <http://lists.cairographics.org/archives/cairo/attachments/20121101/84b977ef/attachment.c>


More information about the cairo mailing list