From:
Operating system: Redhat ES 5.3
PHP version: 5.3.2
Package: GD related
Bug Type: Bug
Bug description:gd rendering freetype incorrectly
Description:
------------
In the test script below, 'a' indicates an input variable that governs the
angle at which the text should be rendered. The test script below renders
fine for a=0. But as you increase a, the letters in the text become
progressively out of alignment until by a=60 the baseline is completely
distorted. By a=160, letters actually overlap.
This problem does not occur on PHP 5.2.6 (in our production environment).
Test script:
---------------
$image = imagecreatetruecolor(500, 500);
$bgcolor = imagecolorallocate($image, 255, 255, 255);
imagefill($image, 0, 0, $bgcolor);
$edgecolor = imagecolorallocate($image, 63, 63, 63);
imagefttext($image, 30, $_GET['a'], 250, 250, $edgecolor, './arial.ttf',
'Services');
header ('Content-type: image/gif');
imagegif($image);
Expected result:
----------------
Expect text to render correctly at all angles.
Actual result:
--------------
Text becomes distorted as angle changes from 0.
--
Edit bug report at http://bugs.php.net/bug.php?id=51383&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51383&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51383&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51383&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51383&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51383&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51383&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51383&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51383&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51383&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51383&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51383&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51383&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51383&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51383&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51383&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51383&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51383&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51383&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51383&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51383&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51383&r=mysqlcfg