Why ttf fonts do not decode properly for non-english languages in imagettftext php?
I want to convert a Kannada/Tamil data to image. I use imagettftext/imagefttext . I tried using the font file tunga.ttf, kedage.dfont etc. The problem is that the kannada data gets converted to image but not all characters are the same as the input data.
Eg: 'Ga'
in kannada is as expected, but 'Gai'
is displayed as 'Ga'
and 'I'
.
I hope someone who knows S开发者_如何学编程outh Indian languages understands this. Here is the line of code that generates the image:
imagettftext($main_img, $fontsize, 0, $line_margin, $line_y, $grey, $fontFile, $data);
Can anyone suggest why does this happen?
精彩评论