ID: 40718 Updated by: [EMAIL PROTECTED] Reported By: public at milindur dot de -Status: Open +Status: Wont fix Bug Type: *Configuration Issues Operating System: Linux (Ubuntu 6.10) PHP Version: 5.2.1 New Comment:
"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?" Freetype1: "--with-ttf=/path" Define the prefix of freetype2 "--enable-gd-native-ttf" Enable gdImageStringTTF function instead of gdImageStringFT/gdImageStringFTEx (both freetype2). Freetype2: --with-freetype-dir=/path Define the prefix of freetype2 In short, you should really use only freetype2. Freetype1 support is already abandoned in HEAD (php6). We keep the option around as some users keep rely on the old functions. But that's all I can do, keeping them around > won't fix. Previous Comments: ------------------------------------------------------------------------ [2007-03-04 22:02:24] public at milindur dot de 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 this bug report at http://bugs.php.net/?id=40718&edit=1