Trouble with rendering antialiased string on surface

Marcin S <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAPxA0CbHFG+PSa0fSQKV_o7Mey2eaxZCGrxYm5Mzaxdo3ezKJA@mail.gmail.com>
Hi guys,
I'm having a problem with drawing a text on image surface, here is example code

#include <cairo.h>
int main(int argc, char **argv)
{
	cairo_surface_t* tar_surface =
cairo_image_surface_create(CAIRO_FORMAT_ARGB32,210,200);

	cairo_t* ctx = cairo_create(tar_surface);

	cairo_move_to(ctx,10,50);

	cairo_font_options_t* cfo = cairo_font_options_create();
	cairo_font_options_set_antialias(cfo,CAIRO_ANTIALIAS_SUBPIXEL);
	cairo_set_font_options(ctx,cfo);

	cairo_select_font_face(ctx,"Sans",CAIRO_FONT_SLANT_NORMAL,CAIRO_FONT_WEIGHT_BOLD);
	cairo_set_font_size(ctx,40);
	cairo_set_source_rgba(ctx,1,1,1,1);
	cairo_show_text(ctx,"RAAWR");

	cairo_move_to(ctx,10,150);
	cairo_set_source_rgb(ctx,0,0,0);
	cairo_show_text(ctx,"RAAWR");

	cairo_surface_write_to_png(tar_surface,"pic.png");

	return 0;
}


and pic genereated by it http://s8.postimage.org/9e67ndveb/pic.png
(it's printed on transparent bg)
Problem is that white string have some strange antialiasing color
(yellow), but black one is ok - any tips?
It's possible im doing something terribly wrong.

Marcin.
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.