U+200F

Reverse direction

Notes:
- Microsoft have a bug, this char don't work sometimes (msoffice 2011 for
Mac affected too)
- parser work left2right put the char on left side of each entry in all XML
files


-- 
Sent by iPhone

Il giorno 05/ott/2010, alle ore 12:19, Boroondas Gupte <
slli...@boroon.dasgupta.ch> ha scritto:

Hi Izze

On 10/05/2010 10:31 AM, izze euler wrote:

I have been looking to get Arabic text working on the SL client, but so far
with no luck. I am only looking to display Arabic for menus and text on the
client.

What I have found is that the Arabic text is being displayed left-to-right,
rather than right-to-left. I have added a language to SL, so I have the
Arabic translations in UTF8 format in XML files, as with the other languages
such as Chinese.

I used Notepad++ to copy the translations to the XML files, and they are
displayed right-to-left correctly. However, when loaded into the SL client,
the text is being reversed so that it reads left-to-right.

Unicode has special control characters to switch between left-to-right and
right-to-left in mixed language documents. Additionally, I think some
programs switch direction automatically when they encounter characters they
know belong to a right-to-left written script. So if the translations are
displayed correctly, Notepad++ is capable of at least one of those, probably
the former (interpreting the control characters).

I have tried reversing the text, so that it displays left-to-right in the
XML file, in the hope that it will then be reversed and display
right-to-left in the client. I cannot read or write Arabic, but I have been
told that the characters are displayed disjoint, most likely due to the
wrong ordering of the characters breaking associations between them in the
XML file.

Arabic script relies heavily on ligatures. Ligatures are glyphs that
represent multiple characters. Other than the ligatures used for latin
script (fl, fi ffi, etc.) which merely make the rendered text look "nicer",
ligatures in scripts like Arabic, Devanagari (a script used for Sanskrit,
Hindi and other Indian languages), Bengali (another Indian language and
script) and probably many others look very distinct from the characters they
represent <http://en.wikipedia.org/wiki/Devanagari#Conjuncts>and aren't
"optional". (Typographs and typesetters might argue that Latin ligatures
aren't optional either. But omitting ligatures in these other scripts will
not only look typographically wrong but, well, just wrong. (I don't know
whether it'd be considered an orthographic error in the respective
cultures.))

Has anyone looked into this problem, or have any ideas to what I could try?

We've discussed the problem this summer, see here:
http://wiki.secondlife.com/wiki/Open_Source_Meeting/2010-07-13

The issue is that while the SL client has support for displaying Unicode
characters, it lacks the ability to use Unicode's script direction markers
and the feature of converting specific character sequences to the matching
ligatures. For pre-set strings (e.g. your UI translation), the first problem
can be worked around by writing stuff backwards, as you already tried. To
work around the second problem, you'd have to directly write the ligature
"characters" (so you have only one character per wanted glyph). I don't know
Unicode well enough to tell whether "characters" for all possible glyphs
exist. It might well be that some ligatures always have to be created
on-the-fly from a sequence of single-character "characters".

Of course, both of these workarounds aren't feasible for chat and other
run-time user input, because users will be used to write sequences of single
characters in reading order rather than ligature "characters" in
left-to-right order. Also, entering these ligature "characters" (if they
even exist) might be complicated and time consuming, because their usual
keyboard layout might not give direct access to them.

 Does anyone have this working?

Adding these features to Linden Lab's homebrewn text rendering system would
be a major effort that probably none of us is capable of.

Alissa Sabre once adapted the Viewer to use Pango for text rendering. ( See
http://wiki.secondlife.com/wiki/User:Alissa_Sabre/Pango_adaptation_in_SL_viewer)
Pango can handle bidirectional text and ligatures just fine, so this solved
the problems. However, these changes haven't been integrated in the official
viewer and her patches are now out of date.

For chat, using Dzonatas' Icesphere (allows for IM and chat in separate GTK+
windows, thus also using Pango) has been recommended to some Arabic users,
and that seems to work alright. Both, the sender and receiver, will have to
use it to be able to chat in Arabic script.

Cheers,
Boroondas

_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting
privileges
_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to