1

Here is my php code

$text = 'ಕನ್ನಡ';
$txt_color1 = 'red';
imagettftext($handle, 30, 0, 25, 60, $txt_color1, 'fonts\akshar.ttf', $text);

It results: enter image description here

*I tried available fonts(kannada) but I'm getting same result.

Janardhan
  • 33
  • 1
  • 7
  • Your resulting image looks like the same text. But if it is not correct. Then the text has to be UTF8 compatible. Can you test in a terminal window or using PHP exec()? If not, then put your text in a text file that is created with a UTF8 compatible text editor. Then change your last command from using $text to @textfile.txt, where textfile.txt is the text file you put your text into. – fmw42 Apr 30 '18 at 16:17
  • According to [this answer](https://stackoverflow.com/a/27270517/4958), "GD does not support Complex Text Rendering (for Arabic, Indic etc)". So you should use some other library; that answer links to [this answer that uses Pango](https://stackoverflow.com/a/7281061/4958). If any of these work for you, please post it as an answer and accept it. – ShreevatsaR May 14 '18 at 18:18

0 Answers0