Bobboau Posted March 16, 2009 Share Posted March 16, 2009 ok, I am wondering if there exists a function or a library with the capability to designate an area on an image where a paragraph will be displayed, and the function figures out what the largest possible font that can work would be and draws it. note this is a considerably more complex task than ImageString. if such a thing does not exists, suggestions on how i might be able to accomplish this? or general text layout library recommendations that might be relevant to my interests. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted March 16, 2009 Share Posted March 16, 2009 there is no one-stop function that does what you want. but you can use the GD library: http://us3.php.net/gd and it's many functions to load up an image and then write text on it Quote Link to comment Share on other sites More sharing options...
Bobboau Posted March 16, 2009 Author Share Posted March 16, 2009 I was hoping there might be a text layout library already made. so you are saying imagettfbbox is my only hope? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted March 16, 2009 Share Posted March 16, 2009 if you just want to use an ugly system font, you can use: http://us3.php.net/manual/en/function.imagefttext.php or if you want nicer text, you can load a TTF file and use: http://us3.php.net/manual/en/function.imagettftext.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.