Outline Text

I am looking for a way to outline text, similar to stroke on a rect or ellipse. I tried stroke and it does nothing. Does anyone know a way to do it? Or should I just make images outside of Codea and import them.

Try importing and image of the text, but slightly bigger. then align it.

You can always do something like…

    background(255, 255, 255, 255)
    fill(0, 0, 0, 255)
    text("HELLO", 100, 100)
    text("HELLO", 98, 98)
    fill(255, 255, 255, 255)
    text("HELLO", 99, 99)

@Mark, I figured, but it’s rather inconvenient for the number of times I do it. Think I’ll write a class that does this so it’s not much extra code, or import images, that way I can add some extra polish to them if I feel. Thanks for the quick response!

EDIT: Side note, why doesn’t stroke outline text like it does everything else?

You know, you could always write a class that draws the offset text into an image and return the image, then use the image.

That would have the advantage of being able to change the text on the fly if needed.

@Mark, that’s what I was thinking of doing, see above:

blah blah blah..."think I'll write a class that does this"...blah blah blah