cvs: pear /Image_Text/Image Text.php

From: Date: Wed, 18 Feb 2004 23:34:47 +0000
Subject: cvs: pear /Image_Text/Image Text.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-16659@lists.php.net to get a copy of this message
neufeind Wed Feb 18 18:34:47 2004 EDT Modified files: /pear/Image_Text/Image Text.php Log: some fixes over which I just stumbled playing with test-scripts http://cvs.php.net/diff.php/pear/Image_Text/Image/Text.php?r1=1.6&r2=1.7&ty=u Index: pear/Image_Text/Image/Text.php diff -u pear/Image_Text/Image/Text.php:1.6 pear/Image_Text/Image/Text.php:1.7 --- pear/Image_Text/Image/Text.php:1.6 Wed Feb 18 16:59:42 2004 +++ pear/Image_Text/Image/Text.php Wed Feb 18 18:34:47 2004 @@ -418,8 +418,9 @@ function init() { // Does the fontfile exist and is readable? - // @todo: on some/all?!? systems it's also possible to just access e.g. "arial" and the fontfile will be - // found automatically ... however this does not work if here we check for the existance of the fontfile + // @todo: with some versions of the GD-library it's also possible to leave font_path empty, add strip ".ttf" from + // the fontname; the fontfile will then be automatically searched for in library-defined directories + // however this does not yet work if at this point we check for the existance of the fontfile if (!is_file($this->options['font_path'].$this->options['font_file']) || !is_readable($this->options['font_path'].$this->options['font_file'])) { return PEAR::raiseError('Fontfile not found or not readable.'); } else { @@ -810,16 +811,20 @@ // the angle. That gives us the offset to slide the line switch($align) { case IMAGE_TEXT_ALIGN_LEFT: - $hyp = -1; + //$hyp = -1; + $hyp = 0; break; case IMAGE_TEXT_ALIGN_RIGHT: - $hyp = $block_width - $line_width - $left_margin -2; + //$hyp = $block_width - $line_width - $left_margin -2; + $hyp = $block_width - $line_width - $left_margin; break; case IMAGE_TEXT_ALIGN_CENTER: - $hyp = ($block_width-$line_width)/2 - $left_margin -2; + //$hyp = ($block_width-$line_width)/2 - $left_margin -2; + $hyp = ($block_width-$line_width)/2 - $left_margin; break; default: - $hyp = -1; + //$hyp = -1; + $hyp = 0; break; }

« previous php.pear.cvs (#16659) next »