php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-24 22:07 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-03-24 22:07 UTC] pajoye@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [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] pajoye@php.net
-Status: Feedback +Status: Duplicate
 [2010-03-24 22:46 UTC] pajoye@php.net
See #51263 (fixed).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC