ID: 34925 User updated by: keith dot miller at ricardo dot com Reported By: keith dot miller at ricardo dot com -Status: Feedback +Status: Open Bug Type: GD related Operating System: RHEL 2.6.9-11.EL SMP PHP Version: 5.0.5 New Comment:
Yes, the latest snapshot fixes the gd problem for me, although it now seems to have introduced a rather unpleasant new bug that causes the PHP to hang with 100% CPU usage when trying to connect to SQL server (mssql) (with latest libtds). I don't think this snapshot can be deployed as is. Probably best to go back to 5.0.4 (which didn't seem to have the truetype issue) Previous Comments: ------------------------------------------------------------------------ [2005-10-20 10:24:13] [EMAIL PROTECTED] It's GD functionality, so the category was fine. Please test with the snapshot... ------------------------------------------------------------------------ [2005-10-20 10:20:39] keith dot miller at ricardo dot com should be under image, not GD ------------------------------------------------------------------------ [2005-10-20 10:19:02] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2005-10-20 10:15:21] keith dot miller at ricardo dot com Description: ------------ imagettftext() ignores absolute positions in this version of PHP. The same code works properly in previous versions. TrueType fonts are now always aligned on the LHS of the image, and positioning is completely broken. This is built on 64-bit Red Hat Enterprise with gcc (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1). gcc -m64 (other flags are default produced by configure) Everything else on the system in stock redhat (with latest patches applied under support contract) Reproduce code: --------------- <?php // Set the content-type header("Content-type: image/png"); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 255, 255, 255); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = '/var/www/ttf/arial.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 111, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 101, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> Expected result: ---------------- Text should be aligned offset from the LHS of the image, not at the LHS. In previous versions of PHP, this works correctly. Actual result: -------------- Text is aligned at the LHS of the image, regardless of the X & Y values. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34925&edit=1