乌尔都语字体的反向渲染
我正在Ubuntu平台上开发一个基于乌尔都语语言的项目。我正在使用Python语言并且几乎完成了我的任务。
问题在于,乌尔都语文本以相反的顺序呈现。
例如,考虑单词
(这意味着工作) 由三个字母组成: 带
,A
,以及 m
输出以相反的顺序呈现为 māket
由三个字母组成: m
,A
,以及 带
将此文本复制到 Open Office 或在 Firefox 中打开生成的 XML 文件时, 生成的结果绝对是理想的。
我正在使用Python 2.6 IDLE,它与Windows平台完美配合,这清楚地表明它不是IDLE的问题。正在研究 TKINTER GUI 库。
如何解决这个问题呢?
I am working on a project that is based on Urdu language in Ubuntu platform. I'm using Python language and have almost achieved my task.
The problem is that, the Urdu text is rendered in reverse order.
For example, consider the word کام
(which means work)
consisting of the three letters:ک
,ا
, andم
The output is rendered in reverse order as ماک
consisting of the three letters:م
,ا
, andک
When copying this text to Open Office or opening the generated XML file in Firefox,
the generated result is absolutely desired.
I Am using Python 2.6 IDLE, its working perfect with Windows platform, which clearly shows its not the problem of IDLE. Am working on TKINTER GUI library.
How can this problem be solved?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在阿拉伯语方面也遇到了类似的问题。 Tkinter 是 Tk GUI 工具包的 Python 接口,不幸的是它不支持双向语言。
我的解决方案是使用 wxPython 代替。 wxPython 也很好,因为您的应用程序在任何使用的平台上看起来都是原生的。
有关 Tk 缺乏 Bidi 支持的更多信息,请访问:http://easygui .wordpress.com/2010/02/03/easygui-and-unicode/
I had a similar problem with Arabic. Tkinter is a Python interface for the Tk GUI toolkit, which unfortunately has no support for bidirectional languages.
My solution was to use wxPython instead. wxPython is also nice because your application will look native on whatever platform it's used.
There's more information on Tk's lack of bidi support here: http://easygui.wordpress.com/2010/02/03/easygui-and-unicode/
使用一个还不错的工具包,例如 PyQt、PyGTK 或 wxPython。
Use a toolkit that isn't terrible, such as PyQt, PyGTK, or wxPython.