Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

RTL and XML

Explorer ,
Jan 26, 2009 Jan 26, 2009
Hello, what is the best way to use the new text component to import the arabic language via xml into flash.

I noticed in the demo with the spinning globe that the arabic text is actually unicode, the unicode string is actually LTR, then is displayed RTL. Obviously this works nicely with wordwrap etc. Is there some sort of converter I can get to convert RTL arabic to LTR unicode?
I'm wondering also if its possible to import the Arabic font as a string from XML, and have things like the word wrap work correctly, I'm presuming here (maybe naively) that there isn't a RTL XML format and if there is flash doesn't wrap its head around it. I can't imagine writing whole paragraphs of text backwards in xml. To do this do I need to use markup code as per the bidi.xml file in the examples, where it seperates out each line for display to deal with the wrap issues.

Any insight would be great, I'm sorry if my explanations are a little newby, i'm no gun.

K.

TOPICS
Text layout framework
2.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jan 28, 2009 Jan 28, 2009
It is up to the application that displays the XML as to how it will appear to you, so I can't speak for whether it the XML will look LTR or RTL when you view it. But the idea is that the Unicode characters are stored in reading order. For TLF, we get the Unicode in reading order, and then the Player converts them into "atoms" that are ordered either RTL or LTR depending on the Unicode values.

The example in bidi.xml does have many shorter lines, but the same principle works on longer paragraph...
Translate
Adobe Employee ,
Jan 28, 2009 Jan 28, 2009
It is up to the application that displays the XML as to how it will appear to you, so I can't speak for whether it the XML will look LTR or RTL when you view it. But the idea is that the Unicode characters are stored in reading order. For TLF, we get the Unicode in reading order, and then the Player converts them into "atoms" that are ordered either RTL or LTR depending on the Unicode values.

The example in bidi.xml does have many shorter lines, but the same principle works on longer paragraphs as well, and TLF, using the Player, will correctly do line wrap regardless of the text direction. In order to get the column order, indents, and punctuation to look right, you will have to decide if your TextFlow and paragraph is mainly LTR or RTL and set the direction attribute appropriately.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 28, 2009 Jan 28, 2009
LATEST
Also check out BabelPad: http://www.babelstone.co.uk/Software/BabelPad.html

It has good complex script support and will convert to unicode.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines