[cairo] text with outline ?

Simon Burton simon at arrowtheory.com
Mon Jan 22 14:53:00 PST 2007


On Mon, 22 Jan 2007 14:04:20 -0800
Carl Worth <cworth at cworth.org> wrote:

> 
> Give that a try and let us know if you're still having trouble.

This is what I ended up with:

def outline_text(ctx, x, y, txt):
    ctx.set_source_rgba(1, 1, 1, 1)
    ctx.set_line_width(2)
    ctx.move_to(x, y)
    ctx.text_path(txt)
    ctx.stroke()
    ctx.set_source_rgba(0, 0, 0, 1)
    ctx.move_to(x, y)
    ctx.show_text(txt)


It looks great !

thanks,

Simon.


More information about the cairo mailing list