php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29260 imagettfbbox relative coordinates changed
Submitted: 2004-07-19 16:27 UTC Modified: 2004-07-20 02:46 UTC
From: operator at infomaniak dot ch Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.8 OS: linux 2.4.x
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: operator at infomaniak dot ch
New email:
PHP Version: OS:

 

 [2004-07-19 16:27 UTC] operator at infomaniak dot ch
Description:
------------
The reference coordinates values changed from 4.3.6 to 
4.3.8 on imagettfbbox() ? 
 
( gd 2.0.26 ) 
 

Reproduce code:
---------------
<pre>
<?php
$font_dir = $_SERVER["DOCUMENT_ROOT"]."/fonts";
$box = imagettfbbox(18,0,$font_dir."/ariblk.ttf","test");
var_dump($box);
?>
</pre>

Expected result:
----------------
array(8) { 
  [0]=> 
  int(0) 
  [1]=> 
  int(-1) 
  [2]=> 
  int(52) 
  [3]=> 
  int(-1) 
  [4]=> 
  int(52) 
  [5]=> 
  int(-19) 
  [6]=> 
  int(0) 
  [7]=> 
  int(-19) 
} 
 

Actual result:
--------------
array(8) { 
  [0]=> 
  int(0) 
  [1]=> 
  int(-20) 
  [2]=> 
  int(53) 
  [3]=> 
  int(-20) 
  [4]=> 
  int(53) 
  [5]=> 
  int(0) 
  [6]=> 
  int(0) 
  [7]=> 
  int(0) 
} 
 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-20 02:46 UTC] iliaa@php.net
There were some fixes to the function that resolved a 
problem in the older code that sometime would get incorrect 
co-ordinates. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 17 11:01:28 2024 UTC