php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34951 X co-ordinate value always seems to be 0 in imagettftext()
Submitted: 2005-10-21 20:56 UTC Modified: 2005-10-21 21:15 UTC
From: aweeks at lssu dot edu Assigned:
Status: Closed Package: *Graphics related
PHP Version: 5.0.5 OS: Fedora Core 4 64-bit
Private report: No CVE-ID: None
 [2005-10-21 20:56 UTC] aweeks at lssu dot edu
Description:
------------
In previous versions of PHP (4.X) the imagettftext() function works appropriately with coordinates.  A php 5.0.5 install with the same configuration options seems to make the X coordinate (4th parameter of the function) always 0.  We have tried several ways to get around it, but the value of x never seems to change: 0.

Reproduce code:
---------------
The code is a standard call to imagettftext.  We have several code snippets, all of which place the text at x=0:

imagettftext($im, 13, 0, 35, 20, $black,
               "/home/protected/fonts/$font",
               $text);

Expected result:
----------------
We expect to see the font text placed 35 pixels in from the left.

Actual result:
--------------
Instead of being 35 pixels in from the left edge of the image, it is flush against the left side of the image.  We have tried this with several image programs, and with various values in place of the x parameter.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-21 20:59 UTC] tony2001@php.net
Please try using this CVS snapshot:

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


 [2005-10-21 21:15 UTC] aweeks at lssu dot edu
I just confirmed that this is resolved in the latest cvs of 5.1 RC4.  Thanks for your help.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC