Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.0

Bug #17448 Font alignment for 90 degrees
Submitted: 2010-05-31 20:09 UTC
From: cheewe Assigned: doconnor
Status: Closed Package: Image_Canvas (version 0.3.2)
PHP Version: 5.2.12 OS: 7.0-RELEASE FreeBSD
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


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 : 40 - 37 = ?

 
 [2010-05-31 20:09 UTC] cheewe (Cheewe Ng)
Description: ------------ For the setup OS version: 7.0-RELEASE FreeBSD PEAR Version: 1.7.2 PHP Version: 5.2.13, when the following code is run, the characters of the line of words set at 90 degrees are incorrectly aligned to the top of the line (left of image), while the line of words set at 270 degrees are aligned correctly Test script: --------------- <?php require_once 'Image/Canvas.php'; $Canvas =& Image_Canvas::factory('png', array('width' => 200, 'height' => 450)); $Canvas->setFont(array('name' => 'Bitstream Vera Sans', 'size' => 10, 'angle' => 270)); $Canvas->addText(array('x' => 50, 'y' => 50, 'text' => 'This line is 270. Characters should align left', 'alignment' => array('horizontal' => 'right'))); $Canvas->setFont(array('name' => 'Bitstream Vera Sans', 'size' => 10, 'angle' => 90)); $Canvas->addText(array('x' => 100, 'y' => 50, 'text' => 'This line is 90. Characters should align right', 'alignment' => array('horizontal' => 'right'))); $Canvas->show(); ?> Expected result: ---------------- The characters of each line should align to the bottom of each line, i.e. for the line whose font is at an angle of 90 degrees, the characters should align to the right of the image. Actual result: -------------- For the above set up, the characters of the line of words set at 90 degrees are incorrectly aligned to the top of the line (left of image), while the line of words set at 270 degrees are aligned correctly

Comments

 [2010-06-03 05:09 UTC] doconnor (Daniel O'Connor)
-Assigned To: +Assigned To: nosey
 [2010-06-15 20:17 UTC] cheewe (Cheewe Ng)
I updated PEAR to 1.9.0 and PHP to 5.2.13 and the bug still exists :-(
 [2010-06-16 19:14 UTC] cheewe (Cheewe Ng)
This is a bug with php ImageTTFText http://aspn.activestate.com/ASPN/Mail/Message/php-dev/3833198 See patch http://bugs.php.net/patch-display.php? bug_id=51263&patch=rotatedimagettf.patch&revision=latest
 [2012-01-02 06:44 UTC] doconnor (Daniel O'Connor)
-Status: Assigned +Status: Closed -Assigned To: nosey +Assigned To: doconnor
The parent bug in php seems fixed.