From: public at milindur dot de Operating system: Linux (Ubuntu 6.10) PHP version: 5.2.1 PHP Bug Type: *Configuration Issues Bug description: PHP with GD2 and FreeType 1.x
Description: ------------ Hello, I am trying to compile PHP (5.2.1 and/or 4.4.6) with bundled libgd (2.0.28) but *without* FreeType 2. Is it right that I am not allowed to use the configure-option "--enable-gd-native-ttf" in this case? If I add --enable-gd-native-ttf the function imagettftext does not work (text is not added to image). If I remove this option imagettftext works. The source of this behaviour seems to be that using --enable-gd-native-ttf enables the macro USE_GD_IMGSTRTTF. This prevents ext/gd/gd.c from executing any function to draw the string: gdImageStringFT/gdImageStringFTEx/gdImageStringTTF are not available because GD2 is used without FreeType 2. For this case gdttf should be called but --enable-gd-native-ttf / USE_GD_IMGSTRTTF prevents this. I think that this case should be avoided by the configure-script (using GD2, FreeType2 not available => refuse --enable-gd-native-ttf). Code below is from http://www.php.net/manual/de/function.imagettftext.php Reproduce code: --------------- <?php Header ("Content-type: image/gif"); $im = imagecreate (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, "/path/arial.ttf", "Test"); ImageGif ($im); ImageDestroy ($im); ?> Expected result: ---------------- black box with white text Actual result: -------------- black box without text, when using --enable-gd-native-ttf with GD2 and without FreeType 2.x -- Edit bug report at http://bugs.php.net/?id=40718&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40718&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40718&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40718&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40718&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40718&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40718&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40718&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40718&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40718&r=support Expected behavior: http://bugs.php.net/fix.php?id=40718&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40718&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40718&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40718&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40718&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40718&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40718&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40718&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40718&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40718&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40718&r=mysqlcfg