abosami Posted September 13, 2010 Share Posted September 13, 2010 hi all .. I want to write arabic text in image .. this is my code .. <?php header("Content-Type: image/png; charset=utf8"); $im = imagecreatetruecolor(150, 30); // Create some colors $white = imagecolorallocate($im, 100, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); $font = 'tahoma.ttf'; $t = 'إن الدين عند الله الإسلام'; $text=utf8_encode($t); imagettftext($im, 20, 0, 10, 20, $black, $font, $text); imagepng($im); imagedestroy($im); ?> Quote Link to comment Share on other sites More sharing options...
Onloac Posted September 13, 2010 Share Posted September 13, 2010 couldn't you just use an arabic font? EDIT: Did a quick search on google and found something that might help you. http://stackoverflow.com/questions/1284896/export-arabic-text-as-images Quote Link to comment Share on other sites More sharing options...
abosami Posted September 13, 2010 Author Share Posted September 13, 2010 thank you Onloac .. I tried to change the font but the result is false .. I'm using araial , tahoma ... etc.. thank you very much .. I will looking now in google search .. ^_* Quote Link to comment Share on other sites More sharing options...
MostafaHashm Posted August 22, 2015 Share Posted August 22, 2015 http://stackoverflow.com/questions/1284896/export-arabic-text-as-images you can read this Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.