Php - drawing text on an image within a box

Soldato
Joined
4 Jul 2004
Posts
2,647
Location
aberdeen
Hi,
I am trying to get php to draw some text on an image, within a certain box (so it wraps lines and doesn't "overflow"). The only way i've been able to do it at the moment is just adding a string a line at a time (And pre splitting it into new lines, by guessing the line lengths).

I've found imagettfbbox which can work out how much area a string will take up, but it won't automatically draw text within a box. Anyone know of any functions to do this?

thanks
 
Back
Top Bottom