2

I am trying to write Tamil text on an image. I tried with different font files like latha.ttf and Uni Ila.Sundaram-01.ttf files. The problem is that the vowels are getting misplaced. Please see the image for reference. Can anyone please suggest to me how to overcome this issue?

Output

I use the code below:

<?php
header('Content-type: image/png; charset=UTF-8');    
$text ='சுற்றிப்பார்க்க ';
$font = './fonts/UniIlla.ttf';    
$im = imagecreatetruecolor(600, 300);    
$bg_color = imagecolorallocate($im, 255, 255, 255);    
$font_color = imagecolorallocate($im, 0, 0, 0);    
imagefilledrectangle($im, 0, 0, 599, 299, $bg_color);   
imagettftext($im, 20, 0, 10, 50, $font_color, $font, $font);   
imagettftext($im, 20, 0, 10, 120, $font_color, $font, $text);    
imagepng($im);    
imagedestroy($im);    
?>
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • It seems to be a bug in many applications, for all Indic Scripts. Which editor/application you use to edit this file? And what is the library or module used to create the image. Give more details. I may be able to solve if possible – SibiCoder Sep 08 '16 at 17:03
  • Thank you for your response sir,i'm using sublime text editor.creating a image use of php GD library.. – Mani Kandan Sep 10 '16 at 07:37
  • I'm also having similar issue in PHP while printing some tamil text on image. – Manikandan Jun 17 '20 at 19:14

0 Answers0