View Full Version : Text outlines with GD image library

name _F1
03-19-2007, 08:40 AM
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?

03-19-2007, 10:36 PM
That's probably the easiest and least likely to cause you problems way of doing it.