tags:

views:

31

answers:

2

Is it possible? \n doesnt work, html doesnt work, nothing seems to work. I know I could just make a new string instead, but that is more effort than should be needed for this simple task.

How can I do this?

+2  A: 

i think you can't

you have to output a new string some pixels lower than the previous.

\n won't do a linebreak for you...

Andre
Darn. How could I find out the font height in pixels?
Cyclone
A: 

You can't insert line breaks, you can get the bounding box of any truetype font by using the imagettfbbox function.

You might want to take a look at the comments on that page and the comments on the imagettftext function page, they might have the answer you are looking for.

evolve