diff --git a/src/image/Image.php b/src/image/Image.php index b7cf0c29..6e54937f 100644 --- a/src/image/Image.php +++ b/src/image/Image.php @@ -1037,6 +1037,10 @@ public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, // Do nothing the text is drawn at baseline by default } } + + $x = (int) round($x); + $y = (int) round($y); + imagettftext( $this->img, $this->font_size, @@ -1147,12 +1151,16 @@ public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $xl -= $bbox[0] / 2; $yl = $y - $yadj; //$xl = $xl- $xadj; + + $xl = (int) round($xl); + $yl = (int) round($yl - ($h - $fh) + $fh * $i); + imagettftext( $this->img, $this->font_size, $dir, $xl, - $yl - ($h - $fh) + $fh * $i, + $yl, $this->current_color, $this->font_file, $tmp[$i]