|
|
|
[
Permlink
| « Hide
]
Rob Linden added a comment - 08/Feb/07 02:23 PM
Filing this in the external tracker since we probably won't get to this right away, and we're guessing that this would be a fairly easy fix for a developer who is literate in Arabic or any developer literate in a language that uses right-to-left text.
Words from different languages could be mixed into a single chat or IM sentence (all using the same font), so directionality shouldn't be inferred from the language preference or by the font used.
In Unicode, there are some specific directionality rules which need to be followed (i.e., some characters are strongly or weakly directional, there are nesting levels, etc.) For more info, see the Bidirectional Algorithm: http://unicode.org/reports/tr9/ It gets tricky because some languages use more than one writing system... like Japanese for example uses Chinese(-inspired) ideograms, a Japanese syllabic script AND "Roman-ji" (i.e., the Roman alphabet.) Roman-ji runs from left to right (no surprise!)... but the rest of the writing goes from right to left.
We eevn see thatin the screenshot: The word "YOU:" is written from left in right in Roman characters, as is the avi's nametag--- but the rest of the writing is in Arabic characters, which are supposed to go right to left. And ideally., you wd want the colon to be to the left of the word "YOU" but you don't "YOU" to be spelt "UOY" Rob,
I'm so sorry to say this, but your comment on 08/Feb/07 unveils that you don't know the nature of Unicode... If you have read any of the primer's text books on Unicode, you should not have said so. The Unicode bidi algorithm specification noted by Peekay Semyorka is the essential reading, but I'd like to suggest you to start from some books intended for novices. For example, "Unicode Primer" by Tony Graham and "Unicode Demystified" by Richard Gillam are very good introductory readings. You, or somebody in Linden lab responsible for Viewer internationalization should read one, if not yet done so. The following is the brief scenario to support Arabic text: (a) You need to have some bidi attribute table for Unicode characters. You can grab unicode character database available on the Unicode website and covert it into any favorite format. (b) You need to implement some bidi algorithm. I guess you need to do so in several classes resides in linden/indra/llui, e.g., LLLineEditor, LLTextEditor, LLTextBox, etc. The job needed depends on whether you accepts the suggestion (c) below; if you do, you don't need to implement all the bidi features here, since FreeType does some part of the algorithm for you. (c) You need to rework on font module in the viewer. I guess the change is tough. The current font module maps each Unicode character code into a rectangular bitmap image, caches the images in a big image surface, and draw font images on the OpenGL surface one-character-by-one. However, to handle Arabic character's cursive property, you need to pass Unicode codes to underlying TrueType rasterizer (FreeType, in this case) as a string (at least word-by-word). word-by-word processing is needed also for handling combining characters, that are essential to write Arabic text. I really want to see the fully internationalized SL viewer to run, but I know it takes some time to implement all required features... P.S., I will file several I18N bug reports soon, probably this weekend, so that the interested developper recognizes the issue. I'm willing to tackle them all, but it is clearly the job far more than one person's. Also, in my personal interests, full support of Japanese text has the #1 priority, Chinese and Korean come next... When and If you get around to implementing this feature... dont forget to make it work on Hebrew too, please. I and many other Israelis have been asking for this feature for years now.
We cant speak in our native tongue in SecondLife despite having the fonts. I've been thinking how we can support world-wide scripts/languages in SL.
Note that, simply arranging characters from right to left is not enough to support Arabic, since Arabic characters change their shape depending on the positions in a word. My best bet, at this moment, is to use pango, or something similar to it, to render the text paragraph-by-paragraph, as opposed to the current character-by-character rendering through direct use of FreeType. (This is still an idea. I've not yet started implementation.) This issue was discussed on Internationalization Triage, 2007-07-27. http://wiki.secondlife.com/wiki/Bug_triage/2007-07-27/Transcript#VWR-112:_Arabic_language_needs_to_be_displayed_right_to_left_rather_than_left_to_right
Just for those who may concern,
This is a screen shot of my experimental pango-based-viewer. No, it is not working yet. The cursor movement on notecard editor, for example, is just broken and totally unusable. I guess I need months... I've posted a new entry at EurekaDejavu.com to try and raise the priority of this issue. The fact is, Second Life is now accommodating just about every major language group except for Arabic. We are doing a major report on Islamic cultures in Second Life at DancingInkProductions.com and most if not all the people we're working with are native Arabic speakers who are residents of Second Life. More on this at my blog post: http://eurekadejavu.blogspot.com/2008/10/when-will-second-life-include-arabic.html
This fix is long overdue. Please make it a priority. Thanks in advance! I join my voice with all the people here.
I urge LL to take a serious look at how they can implement Arabic language inside SL. If they manage to get this done, it will then be a piece of cake to also implement Hebrew language, which is also right-to-left and thus is not displayed correctly. If SL is to be a platform for public diplomacy, as it should be, then people should be allowed to express themselves. And there is no better way to express oneself than in their own mother language. The Arabic-speaking world inside SL desperately needs Arabic support in the viewers and I think this issue cannot be delayed any further now. Best, |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||