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
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:
MUST BE VALID
Solve the problem:
37 - 20 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Apr 19 22:01:28 2024 UTC