Üzerinde metin bulunan bir görüntü oluşturmak istiyorum, LTR dilleri iyi çalışıyor gibi görünüyor, ancak Arapça çalışırken, sadece, işe yaramadıPHP ile görüntülüğe RTL (Arapça) metin yaz
// Create a 300*300 image
$im = imagecreate(300, 300);
// Yellow transparent background and blue text
$bg = imagecolorallocatealpha($im, 255, 255, 0, 45);
$textcolor = imagecolorallocate($im, 0, 0, 255);
// Write an LTR string
imagestring($im, 5, 250, 100, 'test', $textcolor);
$font = 'DroidKufi-Regular.ttf'; // specify the fonts file
$text = "تجربة";
// Add the text
imagettftext($im, 10, 0, 10, 20, $textcolor, $font, $text);
// set a red text color
$textcolor = imagecolorallocate($im, 255, 0, 0);
// strrev doesn't seem to solve the problem
$text = strrev($text);
// add the text
imagettftext($im, 10, 0, 30, 250, $textcolor, $font, $text);
imagefilledrectangle ($im, 0, 0, 1, 1, $bg);
// Output the image
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
nasıl kullanılacağı bir örnek //manual/en/function.imagettftext.php#91028) Kabul ediyorum? Veya [bu bir belki?] (Http://stackoverflow.com/questions/2444015/right-align-text-in-an-image-with-imagettftext-php) .. belki de bilmiyorsunuzdur, belki de sadece [bu bir?] (http://forums.phpfreaks.com/topic/44370-solved-make-text-string-read-from-right-to-left-in-imagettftext-function/) – Ohgodwhy
Evet haklısınız ama bence bu bir http://stackoverflow.com/questions/2444015/right-align-text-in-an-image-with-imagettftext-php bana yardımcı olacak, ama ben bir deneyeceğim , hızlı cevap için teşekkürler :) –
Aslında bu çözüm benim sorunumun yakınında değil –