#22613 [Opn->Csd]: imagettfbox() does not add the kerning distance to the running position
| From: | iliaa@php.net | Date: | Mon, 10 Mar 2003 19:09:31 +0000 |
| Subject: | #22613 [Opn->Csd]: imagettfbox() does not add the kerning distance to the running position | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35290@lists.php.net to get a copy of this message | ||
ID: 22613
Updated by: iliaa@php.net
Reported By: ljpersson at hotmail dot com
-Status: Open
+Status: Closed
Bug Type: GD related
Operating System: SuSE 8.0
PHP Version: 4.3.0
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-03-09 18:05:01] sniper@php.net
As this is bug in GD itself, you should report it to
the author of it too.
------------------------------------------------------------------------
[2003-03-09 05:54:40] ljpersson at hotmail dot com
The calculation of TTF bounding box through ImageTTFBBox() is
incorrect.
This shows up as the bounding box becomes a few pixels to wide when
spaces or characters that extend below the baseline is used. If justa
few simple characters i.e. "abc" is used then it is corect but if you
take the string (for example) " ab cgAj" then the bounding box is
lightly to wide. All texts at zero angle.
I have made a simple example at
http://jpgraph.fan-atics.com/viewtopic.php?t=795
which clearly illustrates and describes the problem.
In that thread there is also a suggestion for a fix (which I hadn't had
time to verify myself). It seems that the kerning distance is not
properly added to the running position.
Hence, the fix should be to in gdft.c replace
pen.x += delta.x;
with
pen.x += delta.x;
penf.x += delta.x;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22613&edit=1