ID: 34268 User updated by: mb at imp dot ch Reported By: mb at imp dot ch -Status: Feedback +Status: Open Bug Type: GD related Operating System: FreeBSD 4.11 PHP Version: 4.4.0 Assigned To: pajoye New Comment:
It is no option to use php5. This is a production system on ISP side. The problem seems to be the FreeBSD port. In some versions it had this option definded: --enable-gd-jis-conv I've removed it and now it works. Martin Previous Comments: ------------------------------------------------------------------------ [2005-08-26 15:26:28] [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 Use the bundled GD ("configure --with-gd", be sure that no gd developement files are in the std path). If the problem persists, please provide the fonts and small script to reproduce the problem. ------------------------------------------------------------------------ [2005-08-26 15:22:06] mb at imp dot ch Description: ------------ After Upgrading PHP from 4.3.3 to 4.4.0, rendered text with imagettftext() doesn't show Umlauts in some cases. It doesn't matter if the string is utf8 encoded or not, the result is the same. If an Umlaut is followed by a space, it is correctly printed: // Works $text = 'Testing\xe4 ...'; But if it is followed by some other Umlaut or a different char, it doesn't work at all. // Doesn't work $text = 'Testing\xe4a ...'; Any ideas ? Installed packages are: gd-2.0.33_1,1 freetype2-2.1.4_1 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, 128, 128, 0); // Doesn't work $text = ' 5 Testing\xe4a ...'; // Works $text = ' 5 Testing\xe4 ...'; // Replace path by your own font path $font = arialn.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> Expected result: ---------------- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34268&edit=1
