#49089 [NEW]: problems with ImageTTFBBox and ImageTTFText
From: fausto dot gastaldin at gmail dot com
Operating system: Linux CentOS
PHP version: 5.2.10
PHP Bug Type: *General Issues
Bug description: problems with ImageTTFBBox and ImageTTFText
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) ;
--
Edit bug report at http://bugs.php.net/?id=49089&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49089&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49089&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49089&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=49089&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49089&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=49089&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=49089&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=49089&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=49089&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=49089&r=support
Expected behavior: http://bugs.php.net/fix.php?id=49089&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=49089&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=49089&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=49089&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49089&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49089&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=49089&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=49089&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=49089&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=49089&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=49089&r=mysqlcfg
Thread (2 messages)
- fausto dot gastaldin at gmail dot com