Bug #17448 [Opn]: Font alignment for 90 degrees

From: Date: Thu, 03 Jun 2010 01:09:24 +0000
Subject: Bug #17448 [Opn]: Font alignment for 90 degrees
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-3858@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=17448&edit=1 ID: 17448 Updated by: daniel.oconnor@gmail.com Reported By: ngcheewe at yahoo dot com Summary: Font alignment for 90 degrees Status: Open Type: Bug Package: Image_Canvas Operating System: 7.0-RELEASE FreeBSD Package Version: 0.3.2 PHP Version: 5.2.12 -Assigned To: +Assigned To: nosey Roadmap Versions: New Comment: -Assigned To: +Assigned To: nosey Previous Comments: ------------------------------------------------------------------------ [2010-05-31 16:09:46] cheewe 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 ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=17448&edit=1

« previous php.pear.bugs (#3858) next »