[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GDK/GTK 1.2 with hebrew support
Yoni Elhanani wrote:
> Last time when I contacted Dov about his work on hebrew GTK+ widgets,
> he had told me that it's no use to do them now,
> since in the next unstable branch of GTK+ (1.3) text widgets will be
> completely rewritten with bidi support, so whatever patch you send now
> will be ignored...
>
> doesn't it apply now too?
That is indeed the case, but Idan already announced that he had written
his stuff, and I was curious to see what approach he had taken. He
just sent me his patch (thanks Idan!) and what he has done is to make
the GdkDrawText routines do a BiDi translation on the string before
it is painted by X11. Unfortunately this approach cannot work properly.
The widgets not only draws strings through gdk_draw_text() but it
also relies on that the information from gdk_char_width() matches
the positions of the drawn characters. This assumption breaks down
if the characters are swapped around. This makes essential things
like cursor movement etc break down. Indeed there is no shortcut to
having the text and entry widgets keep complete BiDi information
(visual-to-logical mapping, both logical and visual strings, etc)
internally.
> but - if fribidi works good enough (i never tried it myself),
> you should send it and let it be used with the new text/entry widgets.
> also you should send it to the guy making a GPLed wordprocessor,
> or other projects that are seeking hebrew support.
I do believe that FriBidi is good enough, both in terms of functionality
and speed, to be used in any free software project. But, as Eli
Marmor has mentioned in the past, and as I have experinced in the
writing of the protobidi text widget, a BiDi library is just a part
in the complex interaction of a bidirectional text widget.
I totally agree about mozilla, and a mail agent etc. I wish I had time
to working on it (or a sponsor taking care of the problem that I don't
have time to work on it (hint: $$$)), but I don't. That's part of the
reason that I'm offering to give a lecture sometime about BiDi and
Hebrew issues to get someone else started on this. Please let the list
know if there is any interest for such a lecture.
Already now there is plenty that could be done. The reflected gtk
widgets should be enough for patching a gtk-based mail agent (e.g.
Balsa, and the author of Balsa is all for it) to support visual
mode Hebrew email. Simple irc and icq support could easily be
inserted as well. It is more or less a question of ripping out the
standard gtk text and entry widgets and inserting the reflected ones
instead. I don't have time to do this, but perhaps someone else does?
Regards,
Dov