某些型号上 LWUIT 中的阿拉伯语单词问题
我使用 LWUIT 创建了一个 gui,它使用阿拉伯语单词(因此它是从右到左)
它在某些型号上运行良好(例如索尼爱立信 T700 或 Elm)。但在某些其他型号(例如索尼爱立信w800)上,文字显示不正确:字母被分开并从左到右一一显示。
我完全不知道原因。
我找到了这个帖子:
LWUIT:显示阿拉伯语单词时出现问题?
这篇文章由 LWUIT 开发者之一 Shai Almog 回答。
所以我在代码中添加了以下行:
list.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
但这并不能解决问题。
1- Shai 回答说应该使用系统字体。我的代码设置系统字体是否正确?
2-还有其他线索吗?
我已经使用 LWUIT 1.5 和 1.4 测试了我的应用程序,对于这个问题,两者都是相同的。
有人能帮我解决这个问题吗?
先感谢您
I've created a gui using LWUIT which uses Arabic words (and so it is right to left)
It works fine on some models (Sony Ericsson T700 or Elm for example). But on some other models (e.g. Sony Ericsson w800) words are not displayed correctly: letters are separated and displayed one by one from left to right.
I have absolutely no clues about the reason.
I found this thread:
LWUIT : issue in showing arabic words ?
This post is answered by Shai Almog who is one of LWUIT developers.
So I added below line to my code:
list.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_MEDIUM));
But it doesn't solve the problem.
1- Shai has answered that system fonts should be used. Is my code correct in order to set system font?
2- any other clues?
I have tested my application with both LWUIT 1.5 and 1.4 and both are the same regarding this problem.
Can anybody help me out of this?
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,一些索尼爱立信手机在显示阿拉伯字体时出现问题。它将在此论坛中进行讨论。
AFAIK some Sony Ericsson mobiles having problem while showing Arabic font. It will be discussed in this forum.
好的,我搜索了问题,现在我有话要说:
当我们在旧的索尼爱立信型号上使用 LWUIT 来显示阿拉伯文本时,似乎存在问题。该问题不会出现在较新的 SE 型号上,并且当您使用标准 jme 或 j2me Polish 时不会出现此问题。 (正如您在我原来的帖子中看到的,w800 有问题,但 T700 没有。所以在 2005 年到 2008 年之间问题得到了解决)。
系统字体有这个问题,并且您不能使用位图字体,因为 LWUIT 不支持阿拉伯单词的位图字体。 (参见:LWUIT:显示阿拉伯语单词时出现问题?)
如何解决:
网上的朋友指导我解决了这个问题:
我接受了他最后的建议,所以我最终没有解决问题,我只是把它留下了:-)
OK, I searched for the problem and now I got something to say:
It seems there's a problem when we use LWUIT on old SonyEricsson models to show Arabic texts. The problem doesn't show up on newer SE models and you won't have this problem when you use standard jme or j2me polish. (As you see in my original post, w800 has the problem but T700 doesn't. so somewhere between 2005 and 2008 the problem is solved).
System fonts have this problem and you can't use bitmap fonts since LWUIT doesn't support bitmap fonts for Arabic words. (see this: LWUIT : issue in showing arabic words ? )
How to solve it :
A friend on the net guided me to this solution:
I accepted his final advice, so I didn't solved the problem at last, I simply left it :-)