Skip to main content
Participant
March 30, 2010
Question

Auto Format Dynamic Text In Thai

  • March 30, 2010
  • 1 reply
  • 524 views
I've struck with this issue for a long time now.

I have one dynamic textbox that'll read a text file written in Thai language.

The text shows fine, but when it have to go to new lines it'll go like:--

-----

For word: "Thai Language"

Desired result:
Thai
Language

My program:
Thai Lan
guage

----

Is there a way to make dynamic textbox do an auto format with Thai/any language that will prevent this behavior?

Or is there some alternative I can use?

,Thanks.

This topic has been closed for replies.

1 reply

Inspiring
March 30, 2010

I don't have any experience with Thai, but I have a little experience with another complex language, Hindi/Devanagari.

It seems that when the text is from a higher unicode area than basic Latin or European languages that the textfield just starts ignoring the spaces and breaks the text in the middle of words.

My solution for Hindi was to write my own bit of code that took a paragraph of text, broke it at the spaces and then checked how long each line got and when it was long enough inserted an actual line break at a space. A bit of a hack, but it worked! My understanding with Thai is that you don't have spaces between your words, is that correct? In that case I don't know what you would do....

There is a new Text Layout Framework which has a lot more advanced typographical controls, but unfortuantely it isn't compatable with AS2—AS3 only.

http://labs.adobe.com/technologies/textlayout/