A cleaned-up version of this patch has been committed to
features/str-metrics now. I encourage every person who feels bored
enough to take a look at this branch and report bugs. At this point, it
is mostly feature-complete. I'd like to fix the most embarassing bugs
that might be found before landing.
I would in particular be interested to know whether the weird languages
(that is, weirder than French is) cause problems.
The only problem that I know of is that the screen moves when selecting,
which is due to some ligature/kerning effects. We will have to discuss
whether we want to fix it (at the price of dropping Color_selectiontext,
which may annoy people with strange color schemes).
JMarc
11/04/2014 12:11, Jean-Marc Lasgouttes:
... or we could do like the following patch, (for the str-metrics
branch). This patch uses Qt for drawing RTL strings and _seems_ to work.
However, I did not commit it because
1/ I do not know what I am doing
and
2/ I have a "better" version (see the code), but it does not work.
The tests for RTL characters (check whether it is in the Arabic or
Hebrew ranges) is probably a bit rough around the edges, but I
think it is possible to get it right. The trick is that we take into
account the layout direction of the characters themselves, not only of
the language.
The nice and scary property of this patch is that it will lead us to
kill our carefully hand tuned Arabic and Hebrew support (for display).
I would appreciate to testing or some comments before applying it to my
branch. I only tried it visually on one Hebrew and one Farsi document.
Note that at this point, I do not intend to implement perfect bidi
handling, but only to re-implement what we already have using
string-level metrics. So please do not try to lure me into implementing
implementing the full specs. The goal is just (for now) to find what I'd
call a Gudinov algorithm, that is something that does not regress wrt
the current implementation.