- - Code, Content, and Presentation
- -- PHP Server Side Scripting
- ---- PHP with created image write text and text pt problem
DrDoc - 10:53 pm on Jun 12, 2013 (gmt 0)
The short answer is: you need to know the exact width of each character, then generate a properly word-wrapped string that is shorter than your maximum width.
You can either do this manually, or look into the solution recommended above. There is really no other way around this.
Thread source: http://www.webmasterworld.com/php/4583026.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com