I would suggest slightly different logic.

Separate the test for determining text direction, and make it something
that the user interface can influence (plug-in, default, not sure). 

I'm sure Avi would prefer the default went the other way, because
probably more of his collection is in Hebrew.

But, in general, any heuristic like "guess based on code points" is
doomed to failure, because it is a heuristic. Unless unicode encompases
rendering direction (does it?), you're guessing about languages you
don't know enough about.

So make it something the user can influence (or replace?).

The rest of the code - how it's implemented - can be built-in as Dean
describes. But is rendering direction important? If the characters
paint themselves in the other order, is that important? Provided the
customer can read them properly afterwards, does anyone care? I'm not
sure. It's not a rhetorical question - I really don't know if it
matters.

For a demonstration project almost 20 years ago, we got a
dual-daisywheel printer (or one wheel with both alphabets on it, don't
remember) and printed side by side columns of the first page of the
hebrew bible (which starts out "In the beginning") and an English
translation (I think we used King James but it's too long ago and the
details are indistinct). 

We reversed the string in memory to calculate space requirements, but
we actually rendered it left to right, including the hebrew, because it
was faster in the hardware and no one reads the type ball as it's
typing.


-- 
Michaelwagner
_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to