classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYi: Implement (naive) Bidi.requiresBidi() workaround


From: Tom Tromey
Subject: Re: [cp-patches] FYi: Implement (naive) Bidi.requiresBidi() workaround
Date: 23 Dec 2005 14:53:12 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Mark" == Mark Wielaard <address@hidden> writes:

Mark>    * Returns false if all characters in the text between start and end
Mark>    * are all left-to-right text.  WARNING, this implementation is
Mark>    * slow, it calls <code>Character.getDirectionality(char)</code> on
Mark>    * all characters.

I'm not sure that this is particularly slow.
Character.getDirectionality mostly does bit-twiddling and array lookups.

Mark>   if (Character.getDirectionality(c) != LEFT_TO_RIGHT)
Mark>     return true;

I think there are a number of directionality-neutral characters as
well.  For instance a paragraph separator character is neutral, and if
one is seen, IMO, this function should not return true.  Also see what
the (java) spec has to say about arabic presentation forms -- they
aren't considered to require bidi treatment.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]