My requirement is , i want to convert the english to Indian local language(say Kannada)
I am able to do the same by using the free online site.
i tried the following
- Code: Select all
Good Morning =>i got the result as " Gಊಡ್ ಂಒರ್ನಿನ್ಗ್ "
the Equivalent HTML text is " ಗೂಡ್ ಮೊರ್ನಿನ್ಗ್ "
Now my requirement is to convert the result(kannada) font to image.
i tried the following
- Code: Select all
header('Content-type: image/png');
$text = htmlspecialchars_decode($_POST['html_text'],ENT_NOQUOTES);
$im = imagecreate(1000, 100);
// White background and blue text
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 255);
// Write the string at the top left
imagestring($im, 5, 0, 0, $text, $textcolor);
// Output the image
imagepng($im);
imagedestroy($im);
But the result shows some other squares. instead if i hard code the $text ="Hai" am getting the imagea as "hai".
so how to convert unicoded string to image using php
Please do help
Thanks in advance
[MP]

