php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49089 problems with ImageTTFBBox and ImageTTFText
Submitted: 2009-07-28 15:57 UTC Modified: 2009-08-07 01:00 UTC
From: fausto dot gastaldin at gmail dot com Assigned:
Status: No Feedback Package: GD related
PHP Version: 5.2.10 OS: Linux CentOS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fausto dot gastaldin at gmail dot com
New email:
PHP Version: OS:

 

 [2009-07-28 15:57 UTC] fausto dot gastaldin at gmail dot com
Description:
------------
After updating php to 5.2.10 (we have freetype 2.2.1 and GD 2.0.34)w e have this problem:
   http://www.fmeshop.com/fm/test/lib/heading.php?text=Felpe12345678

The text is cut, we have a wrong align.



Reproduce code:
---------------
Code used to generate text and align inside png image.

$dip = get_dip($font_file,$font_size) ;
$box = @ImageTTFBBox($font_size,0,$font_file,$text) ;
$image = @ImageCreate(abs($box[2]-$box[0]),abs($box[5]-$dip)) ;
ImageTTFText($image,$font_size,0,-$box[0],abs($box[5]-$box[3])-$box[1],
    $font_color,$font_file,$text) ;
header('Content-type: ' . $mime_type) ;
ImagePNG($image) ;




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-30 06:30 UTC] kalle@php.net
Please try using this snapshot:

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

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


 [2009-08-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 17:01:30 2025 UTC