如何在J2ME中绘制泰文/中文字符串?
我正在尝试使用 graphics.drawString(string, i, i, aAnchor);
在 J2ME Canvas
上绘制泰语/中文字符串,但设备挂起< /strong> 当我这样做时。当我在 string
上使用 SOP 时,它显示 ?????????
。我也尝试过将字符串硬编码为 - String string = "บริการโทรกลับ";
我已经 在这里阅读设备也需要中文/设备上安装了泰文字体,所以我在我的设备上测试了一个泰文网站,发现它能够显示可点击链接中的泰语字符(文本)。我确信我错过了一些东西,但就是不知道它是什么!有人请给我指出正确的方向...
也欢迎黑莓相关的解决方案。
编辑我已经制作了自定义字体如此处所述但仍然无法显示它。另外,我可以使用一些泰语/中文字体文件(最好是 .fnt 扩展名)。
I'm trying to draw Thai/Chinese strings on a J2ME Canvas
using graphics.drawString(string, i, i, aAnchor);
but the device hangs when I do so. When I use SOP on string
, it displays ?????????
. I've tried hard-coding the string too as - String string = "บริการโทรกลับ";
I've read here that the device also needs Chinese/Thai fonts installed on device, so I tested a Thai website on my device and found that it was able to display Thai characters in clickable links (text). I'm sure I'm missing something but just can't figure out what it is! Somebody, please point me in the right direction...
Blackberry related solutions are also welcome.
EDIT I've made a custom font as described here but was still unable to display it. Also, I could use some Thai/Chinese font files (preferably .fnt extension).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过使用 使用 Java ME 应用程序自定义字体? 还可以查看一些有用的搜索对于 使用自定义字体。
Have you tried with custom fonts with Java ME application? Also look on some useful search for using custom fonts.