[cairo] unable to render text

Gerdus van Zyl gerdusvanzyl at gmail.com
Wed Mar 19 08:30:07 PDT 2008


Are you sure the text is within the size of the png you are working from?
Try putting
cairo_move_to(cr, 0, 0);
before
cairo_show_text

And see if anything is showing up. You can also try to leave out
cairo_select_font_face, to use the default font.

~GvZ

On Wed, Mar 19, 2008 at 3:24 PM, Hakki Dogusan <dogusanh at tr.net> wrote:
> Hi,
>
>  Mehmet Kovacioglu yazmış:
>
> > thanks for the quick reply,
>  > here's the code:
>  >
>  [snip some code]
>
> >
>  >     cairo_set_source_rgb (cr, 1.0, 0.0, 0.0);
>  >     cairo_select_font_face (cr, "sansserif",
>  >                 CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
>
>  Did you try another font name, ie: "Sans" ?
>
>
>  >     cairo_set_font_size (cr, 22);
>  >     cairo_text_extents (cr, "ABC", &te);
>  >     cairo_show_text (cr, "ABC");
>  >
>  [snip remaining code]
>
>
>
>
>  --
>  Regards,
>  Hakki Dogusan
>  _______________________________________________
>  cairo mailing list
>  cairo at cairographics.org
>  http://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list