Is it possible to draw an outline around text that is dynamically generated using the GD image library? It's easy enough to create a shadow-like effect by drawing a second layer of text with a slight variation in dimensions, but I can't work out how to do an outline around the text.
For an example of what I mean, see the text on most of the userbars at http://www.userbars.net/.
EDIT: I achieved an effect like what I wanted by drawing the text four times (y+1,y-1,x+1,x-1) before drawing the actual text. Is this the only/most efficient way to achieve the text outline?