JUL
14
2007

Text directionality, or how about those Israeli?

The last couple of days [1] I've been working on bi-directional text in KWord. KOffice as a whole is aimed to be used worldwide, in all sorts of environments and it has to be usable for all sorts of scripts and languages. I'm proud to tell you that the todo list on getting that done is starting to be really really small.

Here is a point wise list of things that we now do properly.

  • KWord and KOffice supports Unicode 5.0. This means in rendering the fonts and loading/saving as well as being able to type all known scripts.
  • BiDi text rendering, and cursor navigation works as expected.
  • KOffice text now has smart auto detecting for directionality of text while the user it typing it. And it will change the direction properly.
  • Inheriting of text direction is made possible; you can set the direction on a document so a latin paragraph in hebrew text is not automatically changed since that would look out of place.
  • The alignment buttons are properly positioned and function as expected for all text, and also when the application is shown right-aligned (--reverse for us europeans). This was a long standing bug that I fixed.
  • Smart showing of directionality button. You can manually alter the direction of a paragraph by clicking a button in the docker. This button will only be shown if the document has mixed directionality already.
  • List items and brackets are properly reversed on right-to-left layout. A user having a number and a list-item suffix of ")" will see that being a "foo (3" on a right-to-left paragraph.

Last year I had some Hebrew lessons from a friendly Israeli, the rest of this stuff I got from books. So please do download KWord alpha2 in a couple of weeks and tell me if I missed anything!

1) you may have noticed these commits in svn some time ago since I wrote this blog a week or two back already while kdedevelopers.org was down.

Comments

Since BiDi is my pet-peeve with KOffice and has been for some time (especially compared to OO.o), I'd love to help improve it in any way.
So if you need help in testing or just some input from a native Hebrew speaker, please contact me.


By fnord at Sat, 07/14/2007 - 13:03

I forgot the most important one!

If you set a page (or document) to be right-to-left then a multi-column layout will also have its text flown into the right column first.
So the ordering of the columns follows the page-direction. :)


By Thomas Zander at Mon, 07/16/2007 - 16:24