From: yvan dot taviaud at m4am dot net Operating system: RedHat 7.3 PHP version: 4CVS-2003-10-20 (stable) PHP Bug Type: GD related Bug description: Can't create clean non-antialised text with ImageTTFText()
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 bug report at http://bugs.php.net/?id=25928&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25928&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25928&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25928&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25928&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25928&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25928&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25928&r=support Expected behavior: http://bugs.php.net/fix.php?id=25928&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25928&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25928&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25928&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25928&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25928&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25928&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25928&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25928&r=float