Yesideez Posted May 16, 2007 Share Posted May 16, 2007 I've managed to use imagettftext() to create a black box with some white text. Is there any way to work out how many pixels wide a particular string is? I'm needing to know whether I should split a string to more than one line if it is longer than the image is wide but I don't know how to do it or even if it is possible. Link to comment https://forums.phpfreaks.com/topic/51635-php-gdlib-and-ttf-fonts/ Share on other sites More sharing options...
Yesideez Posted May 16, 2007 Author Share Posted May 16, 2007 Is anyone able to help? Link to comment https://forums.phpfreaks.com/topic/51635-php-gdlib-and-ttf-fonts/#findComment-254941 Share on other sites More sharing options...
hitman6003 Posted May 17, 2007 Share Posted May 17, 2007 http://www.php.net/imagefontwidth http://www.php.net/imagefontheight http://www.php.net/imageloadfont Link to comment https://forums.phpfreaks.com/topic/51635-php-gdlib-and-ttf-fonts/#findComment-254961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.