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. Link to comment https://forums.phpfreaks.com/topic/149710-paragraph-box-in-image/ 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 Link to comment https://forums.phpfreaks.com/topic/149710-paragraph-box-in-image/#findComment-786118 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? Link to comment https://forums.phpfreaks.com/topic/149710-paragraph-box-in-image/#findComment-786122 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 Link to comment https://forums.phpfreaks.com/topic/149710-paragraph-box-in-image/#findComment-786124 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.