Skip to main content
Participant
November 15, 2011
Answered

Issues with Thai wrapping

  • November 15, 2011
  • 1 reply
  • 1124 views

I have been trying out TLF with various spark and FTE components, but unfortunately have been having issues with line-wrapping in Thai. It doesn't seem to break in between words.

For example, I have tried a spark TextArea/RichText/RichEditableText and set locale for the components to 'th_TH'.

Four Questions:

1) Should Thai be working correctly?

2) Does setting locale matter at all?

3) Do FTE & TLF components have the same bidi/international capabilities? Or is TLF more robust? (For example, should thai/arabic/etc work the same in both a FTE/TLF component?)

4) When highlighting Thai/Arabic/Hebrew in certain components, the characters shift all around with the cursor. Is this a bug?

Thanks a lot

This topic has been closed for replies.
Correct answer Jin-Huang

From FTE team:

We support Thai, but we do not have a Thai dictionary, which is the only way to do proper Thai line breaking, because there are no spaces in Thai text to break on. Maybe someday we can support a Thai dictionary as an external component (like we’re planning for hyphenation), but we’re not going to build one into the player.

1 reply

Adobe Employee
November 16, 2011

Hi bogmead,

There is a attribute to control line wrapping in TLF. The attribute should be set on flashx.textLayout.element.TextFlow(<s:TextFlow> in Flex) or some of its child elements, rather than flex components.

<xs:attribute name="breakOpportunity" type="xs:enumeratedString" default=" auto"/>

Controls where a line can validly break.

Valid values include:

• auto Line breaking opportunities are based on standard Unicode character properties, such as breaking between words and on hyphens.

• any Indicates that the line may end at any character. This value is typically used when Roman text is embedded in Asian text and it is desirable for breaks to happen in the middle of words.

• none No characters in the range are treated as line break opportunities.

• all All characters in the range are treated as mandatory line break opportunities, thereby creating one character per line. This value is useful for creating effects like text on a path.

A range is a continuous group of characters that have none applied. Therefore, selecting “one of” and applying none, results in a range of characters starting with “o” and ending with “f” that have none applied and will not get any line breaks inside the range.

bogmeadAuthor
Participant
November 18, 2011

I tried this, and unfortunately Thai still did not wrap correctly. Can you confirm that TLF/FTE can actually handle Thai line wrapping correctly? I would like to think I am doing something wrong, but have tried many ways and have not found any success.

Also, do versions of Flash/Flex matter? I am using the latest versions of Flash and Flex.

Jin-HuangCorrect answer
Adobe Employee
November 22, 2011

From FTE team:

We support Thai, but we do not have a Thai dictionary, which is the only way to do proper Thai line breaking, because there are no spaces in Thai text to break on. Maybe someday we can support a Thai dictionary as an external component (like we’re planning for hyphenation), but we’re not going to build one into the player.