## Bidirectional Scripts in Desktop Software Bidirectional scripts are those with characters flowing from right to left. Major bidirectional scripts are the Arabic, Persian and Hebrew scripts, but there are other ones too. Supporting these languages in the user interface of a desktop system needs special support in several layers of the system. Experiments and history shows such special support moves on the very thin edge between completely unusable and highly usable. So they deserve their own guidelines for a consistent cross-desktop behavior. That's what we aim to do here. ### Readings (a.k.a. References) * [[Unicode Bidirectional Algorithm|http://www.unicode.org/reports/tr9/]] (UBA from now on, a.k.a UAX#9) is the place to start. It contains the basic algorithm to map a Unicode plain text string to a visual ordering. * [[Bidirectional Layouts in GTK+|http://behdad.org/download/Presentations/bidi-layouts/]] is a presentation of the state of art bidi support in Gtk+ by mid 2004. Discusses several problems and concepts that are general to all GUI applications. * [[Hierarchically Implicit Bidi|http://cben-hacks.sourceforge.net/bidi/hibidi.html]] is a personal proposal for a hierarchical bidi system. * [[Guidelines of a Logical User Interface for Editing Bidirectional Text|http://imagic.weizmann.ac.il/~dov/Hebrew/logicUI24.htm]] (also [[here|http://www-306.ibm.com/software/globalization/topics/bidiui/index.jsp]]) is the guidelines in use by IBM. * [[Yudit Bidirectional Information|http://yudit.org/bidi/]] discusses surprises and potential security problems with bidi text support complying to the UBA. * [[Examples of bidirectional IRIs|http://www.w3.org/International/iri-edit/BidiExamples]] linked from [[Editing 'Internationalized Resource Identifiers (IRIs)'|http://www.w3.org/International/iri-edit/]]. * [[Mozilla Bi-Di API proposal|http://www.langbox.com/AraMosaic/mozilla/BiDi_API.html]] (out-dated) is the old proposal to add support for bidirectional text to Mozilla. Note that the API proposed in this document is missing essential features, like line breaking support. * [[The 'direction' and 'unicode-bidi' properties|http://www.w3.org/TR/CSS21/visuren.html#direction]] in CSS 2.1 specification, and its [[box model|http://www.w3.org/TR/CSS21/box.html#q11]]. * [[A|http://lists.w3.org/Archives/Public/www-style/2002Aug/0396.html]] [[couple|http://lists.w3.org/Archives/Public/www-style/2002Sep/0049.html]] messages about start/end margins as opposed to left/right margins in CSS 3. Unfortunately seems like the whole thing did not make it into final CSS 3. [[Mozilla|https://bugzilla.mozilla.org/show_bug.cgi?id=74880]] bug about the issue, and [[KDE|http://bugs.kde.org/show_bug.cgi?id=56219]]'s. * [[Exploring Better Source Editing for Bidirectional XHTML and XML|http://www.sw.it.aoyama.ac.jp/2005/pub/IUC28-bidi/IUC28.html]], a paper from IUC28, Septembre 2005. Excellent reading in itself, but even more valuable is the list of references. Check it out. * [[Better tutorial on mixed directionality|http://groups.google.ca/group/comp.windows.x.intrinsics/msg/936cf8754a29b740?q=group:comp.windows.x.intrinsics+author:goerwitz&hl=en&lr=&c2coff=1&as_drrb=b&as_mind=9&as_minm=4&as_miny=1994&as_maxd=9&as_maxm=4&as_maxy=1994&rnum=1]] is a Usenet post about cursor movement in bidirectional text. * [[Documentation for BiDi Mozilla|http://developer.mozilla.org/en/docs/Documentation_for_BiDi_Mozilla]]. This is preliminary documentation of the changes introduced to Mozilla as part of the bidi support contributed by IBM (a.k.a. IBMBIDI). * [[RFC: Standard for automatic insertion of bidi control characters|http://osdir.com/ml/region.israel.ivrix.discuss/2003-05/msg00031.html]]. Interesting discussion thread on good ol' ivrix list. ### Non-Readings (a.k.a. Pre-Unicode Tries) * [[Understanding bidirectional language support|http://www-306.ibm.com/software/webservers/hostondemand/library/v8infocenter/hod/en/help/bidi.html]] is an older IBM standard. * ECMA TR53 Handling of Bi-directional Texts, Second Edition is a technical report on supporting bidi text in text terminals. No one knows if it was ever implemented. ### Implementations * [[GNU FriBidi|http://fribidi.org/]] is GNU project's implementation of the UBA, also used in several other projects. * [[Automatic paragraph direction according to the UBA in Gtk+|http://bugzilla.gnome.org/show_bug.cgi?id=70451]] (bugzilla discussion) (also [[this|http://bugzilla.gnome.org/show_bug.cgi?id=136529]] and [[this|http://bugzilla.gnome.org/show_bug.cgi?id=116626]].) * [[Handling markup text from a bidi point of view|http://bugzilla.gnome.org/show_bug.cgi?id=168108]] (bugzilla discussion). * [[miniBidi|http://cvs.arabeyes.org/viewcvs/projects/adawat/minibidi]] is a minimal implemention of the UBA (BMP only, implicit only). * [[PGBA: Pretty Good Bidi Algorithm|http://crl.nmsu.edu/~mleisher/ucdata.html]] (approximate, implicit only) * [[GtkBidiText: A Gtk BiDirectional text widget for Hebrew|http://imagic.weizmann.ac.il/~dov/freesw/gtk/gtkbiditext/]] (out-dated) * [[ProtoBidi: The Prototype Bidirectional Widget|http://imagic.weizmann.ac.il/~dov/Hebrew/protobidi/]] (out-dated) * [[Mozilla BiDi UI Extension|http://bidiui.mozdev.org/]] is a Mozilla extension to support bidi widgets on Mozilla user interface. * [[Gedit Bidi Assistant|http://live.gnome.org/Gedit/Plugins/BidiAssist]] is a Gedit plugin for dealing with Unicode bidirectional markup. ### Mailinglist All bidi discussion is currently on [[bidi at lists freedesktop org|http://freedesktop.org/mailman/listinfo/bidi/]]. The archives are [[here|http://freedesktop.org/pipermail/bidi/]]. -- [[BehdadEsfahbod|BehdadEsfahbod]] - June 7, 2005