#22613 [Opn]: imagettfbox() does not add the kerning distance to the running position

From: Date: Mon, 10 Mar 2003 00:05:02 +0000
Subject: #22613 [Opn]: 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-35151@lists.php.net to get a copy of this message
ID: 22613 Updated by: sniper@php.net Reported By: ljpersson at hotmail dot com Status: Open Bug Type: GD related Operating System: SuSE 8.0 PHP Version: 4.3.0 New Comment: As this is bug in GD itself, you should report it to the author of it too. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#35151) next »