[thelist] setting the wrap width of rendered text usng php gd

Dunstan Orchard dunstan at 1976design.com
Sun Oct 13 19:06:01 CDT 2002


Hi again,

does anyone know how to limit the width of text when writing it to an image in
php?

I am writing text to an image 300px wide, so I want to wrap the text display
at something like 280px - but I can't figure out how?

See an example of my text not wrapping here:

http://www.1976design.com/testarea/photo/image4.php


My plan is to limit the text width, then work out the height of the text box
using imagettfbbox() then create the image with the height set to accomodate
the text...


Any help gratefully received,

thanks as always,

- dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list