Hi,

After we have basic BiDi support on trunk, my next priority
is having RTL (right-to-left) paragraph render with right
justification.

There is an excellent location to do this (IMO) which is
font::draw_text_line(surface...) and I started testing a
very small patch that achieve this goal -- but encountered
a glitch.

The 2nd argument to font::draw_text_line(..., SDL_rect& area, ...)
is used to compute the destination area into which the text is
rendered. This is important, so I can do the right justification.

However, I found that in many cases the callers of this method
pass meaningless clipping area -- just as an example, show_dialog()
compute it as the whole screen (show_dialog.cpp:354) and than
pass this value to font::draw_text() which propagate it to
font::draw_text_line().

So my strategy is to first fix all these calls so they receive
a meaningfull clipping area and only then put the right-justifying
patch. This way, most of the change have nothing to do with Bidi and
the Bidi specific code remains small and in well defined "hooks".

The preparatory work looks pretty big:
        $ grep -w draw_text *.cpp | wc -l
        62
        $ grep -w draw_text_line *.cpp | wc -l
        4
So any comments, hints, objections before I start it are most welcome.

TIA,

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

There are only 10 types of people in the world-
Those who understand binary, and those who do not.

Reply via email to