为什么 ttf 字体不能正确解码 imagettftext php 中的非英语语言?
我想将卡纳达语/泰米尔语数据转换为图像。我使用 imagettftext/imagefttext 。我尝试使用字体文件 tunga.ttf、kedage.dfont 等。问题是卡纳达语数据被转换为图像,但并非所有字符都与输入数据相同。 例如:卡纳达语中的 'Ga'
符合预期,但 'Gai'
显示为 'Ga'
和 'I'< /代码>。 我希望懂南印度语言的人能理解这一点。这是生成图像的代码行:
imagettftext($main_img, $fontsize, 0, $line_margin, $line_y, $grey, $fontFile, $data);
任何人都可以建议为什么会发生这种情况吗?
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 South 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论