imagettfbbox and imagettftext

From: Date: Fri, 23 Feb 2001 21:35:34 +0000
Subject: imagettfbbox and imagettftext
Groups: php.general 
Request: Send a blank email to php-general+get-41374@lists.php.net to get a copy of this message
I've gone through the manual and user notes on these functions, and they tend to be highly illogical ;-) The numbers don't coincide, the x/y values are negative when it seems they ought to be positive, etc. If someone has already figured this out, would you post a code snippet that will create an image the size of the ttf bounding box and draw the string of text exactly centered on the image... this should work no matter what string of text is used, what font is used, what font size is used and if letters hang below the baseline or not. Thanks Monte

« previous php.general (#41374) next »