|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
43 - 40 = ?
Subscribe to this entry?

 [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: Mon May 27 09:01:30 2024 UTC