php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48801 Problem with imagettfbbox
Submitted: 2009-07-05 06:12 UTC Modified: 2009-07-27 15:15 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: dgdd at wanadoo dot fr Assigned:
Status: Closed Package: GD related
PHP Version: 5.3.0 OS: Windows XP
Private report: No CVE-ID:
 [2009-07-05 06:12 UTC] dgdd at wanadoo dot fr
Description:
------------
delivered value problem

Reproduce code:
---------------
$dimensions_texte = imagettfbbox( 50, 0, "SCRIPTIN.TTF", "test");

echo $dimensions_texte[0]."  *  ";
echo $dimensions_texte[1]."  *  ";
echo $dimensions_texte[2]."  *  ";
echo $dimensions_texte[3]."  *  ";
echo $dimensions_texte[4]."  *  ";
echo $dimensions_texte[5]."  *  ";
echo $dimensions_texte[6]."  *  ";
echo $dimensions_texte[7]."<br>";

Expected result:
----------------
Width PHP 5.2.8 :

-1 * 36 * 98 * 36 * 98 * -61 * -1 * -61      <<<< PHP 5.2.8


Actual result:
--------------
Width PHP 5.3.0

-1 * -1 * 104 * -1 * 104 * -100 * -1 * -100  <<<< PHP 5.3.0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-09 09:47 UTC] info at classic-emaille dot de
Hello,

I have the same problem after upgrading from PHP version 5.2.9 to 
version 5.2.10. 

imagettfbbox delivers in version 5.2.10 different values then in version 
5.2.9.
 [2009-07-23 11:16 UTC] john dot peterson3 at hotmail dot com
Thanks for noticing. Please try to fix it if you can. I can't determine how far above or below the baseline the font is extending now. Could there be a fix in 5.2.11?


Best Regards
John
 [2009-07-23 12:22 UTC] dgdd at wanadoo dot fr
I'm tested width : php 5.2.11 
This snapshot was automatically generated on
Thu, 23 Jul 2009 11:45:25 +0100
Version: 5.2.11-dev
Branch: HEAD
Build: Release_TS


The bug is not fixed

Best regards)
 [2009-07-27 15:02 UTC] svn@php.net
Automatic comment from SVN on behalf of tabe
Revision: http://svn.php.net/viewvc/?view=revision&revision=286415
Log: fixed #48732 (TTF Bounding box wrong for letters below baseline) and #48801 (Problem with imagettfbbox)
 [2009-07-27 15:06 UTC] svn@php.net
Automatic comment from SVN on behalf of tabe
Revision: http://svn.php.net/viewvc/?view=revision&revision=286416
Log: MFH: fixed #48732 (TTF Bounding box wrong for letters below baseline) and #48801 (Problem with imagettfbbox)
 [2009-07-27 15:11 UTC] svn@php.net
Automatic comment from SVN on behalf of tabe
Revision: http://svn.php.net/viewvc/?view=revision&revision=286417
Log: MFH: fixed #48732 (TTF Bounding box wrong for letters below baseline) and #48801 (Problem with imagettfbbox)
 [2009-07-27 15:15 UTC] tabe@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 02:02:27 2014 UTC