On Fri, 11 Feb 2005, Saied Nesbat wrote:
Thanks Behdad!
You're welcome.
I have gone through your slide presentation online and I am trying to sort
out things now!
Good.
So you mean each para should be wrapped in RTL PDF pair? I have experimented
with outputting RTL, but in some apps (mainly Word) it does not seem to have
any effect. Is there a setting in word that can remedy this?
No, paragraphs should not be wrapped in anything. Some systems
automatically detect paragraph direction based on its content
(basically the first alphabetic letter), but apparently Microsoft
systems don't. So you've got to push a button in Word for that.
I'm sure you can find answers to all your problems here:
http://students.washington.edu/irina/persianword/persianwp.htm
Do you know of any tool that correctly implements the protocol, so that I
can use it for testing?
The gedit text editor from the GNOME project is a good example.
Basically anything using latest GNOME libraries implements this.
Best regards,
Saied
P.s., My friend Farhad Msoudi who just visited Toronto tells me that the a
huge portion of the CS dept of Toronto university is Iranian.
Congratulations guys!
Thanks.
behdad
-Original Message-
From: Behdad Esfahbod [mailto:[EMAIL PROTECTED]
Sent: Friday, February 11, 2005 1:43 PM
To: [EMAIL PROTECTED]
Cc: Persian Computing List
Subject: RE: A new Persian Unicode keyboard
Well, [softening my throat] like Ehsan already mentioned, then
only trick is to use RTL paragraphs, and not only right-align the
paragraph. That solves most of the problem. For the remaining
few cases, these things called LRM and RLM should be used.
behdad
On Thu, 10 Feb 2005, Ehsan Akhgari wrote:
The problem, as some of you might have guessed, is the direction
switching.
Given an application like MS Word, my keyboard correctly sends the
characters, and Word gives them the right form. But sometimes some
characters (mainly the shared chars), and often the blinking caret
appear
on the wrong side of the line.
What can be done to make the shared characters (Like !) to appear on the
correct side? The caret problem can be fixed with Word's RTL command. But
mixing English and Persian letters in the same line often leads to
unpredictable outcomes.
The rule of the thumb is, use RTL paragraphs when writing Persian text
(which might contain English text within it) and use LTR when writing
English text (which might contain Persian text within it.)
Is there an algorithm governing these situations that I can use to modify
the output to remedy this?
There is an algorithm called Unicode BiDirectional Algorithm, the details
of
which is avaibale on Unicode.org. As you might have guessed, Word doesn't
provide a correct implementation of this algorithm (nor do any other text
editors that I know of to this date.) There's a library being developed
called FriBidi, of which Behdad is the project maintainer, IIRC, which
might
help you, but not with Word probably. I guess Behdad would be able to
make
profound comments on this.
-
Ehsan Akhgari
www.farda-tech.com http://www.farda-tech.com/
List Owner: mailto:[EMAIL PROTECTED]
MSVC@BeginThread.com
[Email: [EMAIL PROTECTED]
[WWW: http://www.beginthread.com/Ehsan ]
--behdad
http://behdad.org/
--behdad
http://behdad.org/
___
PersianComputing mailing list
PersianComputing@lists.sharif.edu
http://lists.sharif.edu/mailman/listinfo/persiancomputing