ID: 25928 Updated by: [EMAIL PROTECTED] Reported By: yvan dot taviaud at m4am dot net -Status: Closed +Status: Bogus Bug Type: GD related Operating System: RedHat 7.3 PHP Version: 4CVS-2003-10-20 (stable) New Comment:
This is not a bug in PHP, please leave it on bogus. Thank you! Previous Comments: ------------------------------------------------------------------------ [2003-12-09 17:11:30] yvan dot taviaud at m4am dot net Ok, I've found the workaround ! Please close the bugs I've noticed in a previous note for this 'bug'. So, the problem is that FreeType has suppressed a function in the 2nd version : the bytecode interpreter. You need to reactivate it : file : freetype-source-dir/include/freetype/config/ftoption.h reactivate the commented line : /* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ to : #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER And rebuild you freetype lib. HTH, best regards, Yvan. ------------------------------------------------------------------------ [2003-12-09 04:16:32] yvan dot taviaud at m4am dot net Ok, it's a FreeType bug, and not a PHP bug, but I think it's important to tell about since many 'PHP bugs' are stressed out. Under Debian, just install libfreetype6_2.1.7-1_i386.deb ! I tried to install the 2.1.7 from the sources, and I got the same bad anti-alias/non-anti-alias. Same thing while compiling it under RedHat. So strange. I'll try to find out why the Debian package is ok, whereas a source compiling is not. ------------------------------------------------------------------------ [2003-12-09 03:40:32] yvan dot taviaud at m4am dot net Ok, I think I found the problem and a fix ! In fact the problem occurs on my RedHat box but not on my Debian box. I've managed to find that : freetype-config --version is 9.4.3 on RedHat and 9.5.3 on Debian ! I tried to uninstall libfreetype6 on Debian, and install the 9.4.3, and the problem then occurs ! So I think it must be the libfreetype6 that must be updated, but I don't know exactly how... Because the 9.5.3 is not stable (my Debian install is unstable/testing, so...). I'll try to install 9.5.3 on RedHat, and feedback if OK or not. Please note that this bug is the same as #7769 (not sure), #21879, #21554 (already closed) and #15405. Many to close then if I found that's the good workaround ;o) ------------------------------------------------------------------------ [2003-10-21 15:31:09] [EMAIL PROTECTED] The whole point of anti-aliasing explained: http://www.widearea.co.uk/designer/anti.html ------------------------------------------------------------------------ [2003-10-20 19:26:38] yvan dot taviaud at m4am dot net Description: ------------ My server is : - RedHat 7.3 - Apache 1.3.28 - PHP 4.3.4RC3-dev (tried this last one to see if the bug disappears, but not) - bundled GD (2.0.15) - FreeType 2.1.5 The problem is that when I use a negative color index for ImageTTFText(), the antialias disappears, but the text is quite ugly, and should not. No info on GD/FreeType website is available on such a bug. Reproduce code: --------------- $height = 60; $width = 150; $font = "arial.ttf"; $img_en = imageCreate($width, $height); $background_en = imageColorAllocate($img_en, 0xFF, 0xFF, 0xFF); $color_en = imageColorAllocate($img_en, 0x0F, 0xBD, 0xBF); // Antialias : imageTTFText($img_en, 12, 0, 10, 30, $color_en, $font, "AZERTYUIOP"); // No antialias : imageTTFText($img_en, 12, 0, 10, 50, -$color_en, $font, "AZERTYUIOP"); imagePNG($img_en); Expected result: ---------------- A clean text, such as the one you could see on a web page (because the text is never antialiased on a web page). Actual result: -------------- You could see the actual result at this address : http://www.lacoccinelle.net/test/index.php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25928&edit=1