> Unfortunately some of the links in the bug report are broken. I'd > love to see real world examples of text to be displayed and how it > should look on the terminal.
I've asked the reporter if he can kindly send me the images that were posted on the bug report. As soon as I get them I'll share them with you. > It's been on the back-burner because I don't know any RTL languages or > how they should look when mixed in with LTR text, and in Arabic in > particular how to handle ligatures with neighbouring characters. I've > switched the priority back to 'major', as it should be. Unfortunately I don't know any RTL languages myself. A quick read through this article[1] taught me that in unicode text direction is inferred by the characters used; and that it can be explicitly set using special characters. > StandardTextLayout does left/center/right alignment and space/any/clip > wrapping but doesn't reorder RTL characters. A new BiDiTextLayout > could reorder characters based on their Unicode direction. The data > structure that text layout objects would have to return will be > unwieldy if the whole string is RTL, however. Maybe now is the time > to extend that structure to support ranges of RTL text. I'm going to have to familiarize with the source. I already took a look at the gist you posted. It's clearly not the ideal implementation but it helped me understand how text layout works in urwid. I'll ping you on IRC if I have any trouble understanding the code, and maybe I can clean up some of the hairy parts in the process. Thank you for your time. And kudos for urwid, turses (and many others) wouldn't be possible without it. [1]: http://www.iamcal.com/understanding-bidirectional-text/ On Sat, Nov 17, 2012 at 09:58:59AM -0500, Ian Ward wrote: > Hello Alejandro, and thank you for Turses! > > On Sat, Nov 17, 2012 at 7:19 AM, Alejandro Gómez <[email protected]> > wrote: > > Hello everybody, > > > > I'm using urwid for building an application and recently a user > > submitted a bug regarding the incorrect display of arabic characters[1]. > > Unfortunately some of the links in the bug report are broken. I'd > love to see real world examples of text to be displayed and how it > should look on the terminal. > > > Another user pointed out a 6 year old issue[2] for implementing > > support for bidirectional text. Its priority is set to "minor" so I > > guess it won't be addressed in the near future. > > It's been on the back-burner because I don't know any RTL languages or > how they should look when mixed in with LTR text, and in Arabic in > particular how to handle ligatures with neighbouring characters. I've > switched the priority back to 'major', as it should be. > > > I would like to ask if someone has any clues about how to include this > > in urwid. I wouldn't mind to spend some time on it myself but I'm > > clueless on how to even get started. > > I would love to get this issue fixed. I see it as a number of related > changes: > > 1. BiDi support in Unicode text displayed with Text widgets > 2. alignment swapping for RTL text in Text widgets (text should be > right-aligned by default) > 3. reordering columns globally when an application is started in a RTL > locale (the first column should be on the right) > > For Turses you might only need #1. > > The best way I see to handle #1 is with a BiDi-aware text layout class > > http://excess.org/urwid/docs/manual/textlayout.html > > StandardTextLayout does left/center/right alignment and space/any/clip > wrapping but doesn't reorder RTL characters. A new BiDiTextLayout > could reorder characters based on their Unicode direction. The data > structure that text layout objects would have to return will be > unwieldy if the whole string is RTL, however. Maybe now is the time > to extend that structure to support ranges of RTL text. > > Please join the IRC channel if you need help working with that code. > > Ian > > > [1]: https://github.com/alejandrogomez/turses/issues/120 > > [2]: http://excess.org/urwid/ticket/14 > > _______________________________________________ > Urwid mailing list > [email protected] > http://lists.excess.org/mailman/listinfo/urwid _______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
