Re: speed of testtext, directionality
- From: Owen Taylor <otaylor redhat com>
- To: "Karl Koehler <koehler or uni-bonn de> writes":@gnome.org
- Cc: gtk-i18n-list gnome org, dov imagic weizmann ac il
- Subject: Re: speed of testtext, directionality
- Date: 19 Jul 2000 17:16:36 -0400
Karl Koehler <koehler@or.uni-bonn.de> writes:
> On 10 Jul 2000, Owen Taylor wrote:
>
> > > #2: Strange behaviour of the arabic shaper when appending text to the end
> > > ot the line in left-to-right mode:
> > > Actually, in this case, no shaping is done, and the characters do not
> > > appear ( Or only unshaped, if you have iso10646-1 encoded fonts ).
> > > In this case, even though several arabic letters may have been typed,
> > > any shaper's PangoAnalysis reveals that we are in a left-to-right run
> > > of characters : analysis->level % 2 == 0 !
> [ ... Ø]
> > Hmmm - I can't seem to reproduce this. If I create an empty
> > buffer in texttext, in LTR mode, and start typing in arabic
> > characters, they are shaped as I would expect.
>
> Actually, for me this is a sure way to have them not shaped.
OK, tracked this one down. (I'm not sure why I didn't see it
happening before - since an example was staring me in the face for
pango-viewer HELLO.utf8)
Here is a patch for fribidi-0.1.12 that fixes the problem - I'm
not sure that it is the most elegant way of fixing the problem
but it seems to work.
Regards,
Owen
--- fribidi-0.1.12/fribidi.c.rtl Wed Jul 19 17:08:33 2000
+++ fribidi-0.1.12/fribidi.c Wed Jul 19 17:12:12 2000
@@ -499,6 +499,15 @@
RL_TYPE(pp->prev) = FRIBIDI_TYPE_L;
}
+ /* Handle the two rules that effect pp->prev for the last element */
+
+ if (RL_TYPE (pp->prev) == FRIBIDI_TYPE_AL) /* W3 */
+ RL_TYPE(pp->prev) = FRIBIDI_TYPE_R;
+ if (RL_TYPE (pp->prev) == FRIBIDI_TYPE_EN /* W7 */
+ && last_strong == FRIBIDI_TYPE_L)
+ RL_TYPE(pp->prev) = FRIBIDI_TYPE_L;
+
+
compact_list(type_rl_list);
/* 5. Resolving Neutral Types */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]