开发者

Reverse rendering of Urdu fonts

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 th开发者_如何学Cis problem be solved?


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/


Use a toolkit that isn't terrible, such as PyQt, PyGTK, or wxPython.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜