Problem with drawtext function
Dear programmer,
we found an main Problem in your drawtext function.
the problem ist that wehen you draw 2 strings like:
string1:3
string2:Testg
the 3 and the T are not on the same high. So its allways looks like the 3 is deeper than the T.
For thsi we found an fix:
File:pImage.class.php
function getTextBox (row 209)
Code:
$coords = imagettfbbox($FontSize, 0, $FontName, $Text);
$coords2 = imagettfbbox($FontSize, 0, $FontName, $Text.'3Bg');
$a = deg2rad($Angle); $ca = cos($a); $sa = sin($a); $RealPos = array();
for($i = 0; $i < 7; $i += 2)
{
$RealPos[$i/2]["X"] = $X + round($coords[$i] * $ca + $coords[$i+1] * $sa);
$RealPos[$i/2]["Y"] = $Y + round($coords2[$i+1] * $ca - $coords2[$i] * $sa);
}
we insert cords2 for the height calculation the other for the width.
this works but it isnt beautiful.
mybe you can fix ths problem better