line breaks and wrapping incorrect on hebrew+english text
i have a string of mixed text with hebrew and english, usually the english is only the last word in the string.
when trying to show on a limited space (110px more or less) the line break looks like it performs incorrectly since the string is all mixed and it shows the english word in between the hebrew words.
I'm using the following, in a *pure* as3 project in the flex ide using sdk 3.5 and last version textframework swc.
private function addText():void{
//title is a string brought from xml.
title = "Canazei סקי איטלקי במיטבו בעיירה";
var titleLine:StringTextLineFactory = new StringTextLineFactory();
titleLine.text = title;
titleLine.paragraphFormat
titleLine.compositionBounds = new Rectangle(0,0,120,120);
titleLine.spanFormat = formatMe(blue, 12, "bold");
titleLine.createTextLines(callbackTitle);
function callbackTitle(tl:TextLine):void{
addChild(tl);
tl.y = 12;
tl.x = 109 - tl.width;
}
}
//thats the formatMe function:
public function formatMe(colour:uint, size:uint, weight:String):TextLayoutFormat{
characterFormat = new TextLayoutFormat();
characterFormat.fontSize = size;
characterFormat.color = colour;
characterFormat.direction = flashx.textLayout.formats.Direction.LTR;
characterFormat.textAlign = flashx.textLayout.formats.TextAlign.START;
characterFormat.fontFamily = "Arial, Helvetica, _sans";
characterFormat.lineHeight = "100%";
if (weight == "bold"){
characterFormat.fontWeight = flash.text.engine.FontWeight.BOLD;
}
return characterFormat;
}
any help with this will be greatly appreciated, unfortunately the bidi support is not clear and sometimes the examples in the docs are not working.
