|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51383 gd rendering freetype incorrectly
Submitted: 2010-03-24 21:35 UTC Modified: 2010-03-24 22:46 UTC
From: james dot jones at firstinvestors dot com Assigned:
Status: Duplicate Package: GD related
PHP Version: 5.3.2 OS: Redhat ES 5.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: james dot jones at firstinvestors dot com
New email:
PHP Version: OS:


 [2010-03-24 21:35 UTC] james dot jones at firstinvestors dot com
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');

Expected result:
Expect text to render correctly at all angles.

Actual result:
Text becomes distorted as angle changes from 0.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-24 22:07 UTC]
-Status: Open +Status: Feedback
 [2010-03-24 22:07 UTC]
Please try using this snapshot:
For Windows:

 [2010-03-24 22:44 UTC] james dot jones at firstinvestors dot com
The problem appears to be resolved in the latest snapshot. Thanks!
 [2010-03-24 22:46 UTC]
-Status: Feedback +Status: Duplicate
 [2010-03-24 22:46 UTC]
See #51263 (fixed).
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 07:01:29 2024 UTC