بسم الله
اكتب الكود التالى لاكتب نص عربى على صوره ولكن الحروف تظهر متبعثره فمثلا احمد تكتب د م ح ا
حاولت تغيير الخط مرات ومرات ولكن لا زالت المشكله قائمه
هل من حل ؟
<?php
header("Content-type: image/png");
$im = imagecreatetruecolor(400, 30);
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
$text = 'محمد';
$text=iconv('','UTF-8',$text);
$font = 'trado.ttf';
// Add some shadow to the text
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
// Add the text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
imagepng($im);
imagedestroy($im);
?>