textAlignLast Issue
I'm working with Adobe AIR 2.0, the TLF 2.0, and FlashPlayer 10.1
I'm having some problems with TextAlign.JUSTIFY and textAlignLast.
I'm bringing in some content from another application, and displaying it using a custom class built around a TextFlow. This works well and most common text formatting (bold, italic, font, colour, etc) is displaying correctly. I've created a test document with some Lipsum fields that test each of the justification settings. The document should look like this when rendered:

What I actually get, however, is this:

Note that while full justification and right last line justification have worked correctly, left last line justification and center last line justification (the two fields in the bottom left corner and bottom middle) have not.
My code to set the justifcation is a pretty simple switch, which sets the formatting on a paragraph object:
switch (Justification)
{
case "LeftAlign":
$flowElement.textAlign = TextAlign.LEFT;
$flowElement.textAlignLast = undefined;
break;
case "RightAlign":
$flowElement.textAlign = TextAlign.RIGHT;
$flowElement.textAlignLast = undefined;
break;
case "CenterAlign":
$flowElement.textAlign = TextAlign.CENTER;
$flowElement.textAlignLast = undefined;
break;
case "LeftJustified":
$flowElement.textAlign = TextAlign.JUSTIFY;
$flowElement.textAlignLast = TextAlign.LEFT;
break;
case "RightJustified":
$flowElement.textAlign = TextAlign.JUSTIFY;
$flowElement.textAlignLast = TextAlign.RIGHT;
break;
case "CenterJustified":
$flowElement.textAlign = TextAlign.JUSTIFY;
$flowElement.textAlignLast = TextAlign.CENTER;
break;
case "FullyJustified":
$flowElement.textAlign = TextAlign.JUSTIFY;
$flowElement.textAlignLast = TextAlign.JUSTIFY;
break;
}
}
And when I select the offending text and trace the formatting settings, I get the expected combinations of textAlign / textAlign last, even though the visual appearance is wrong.
What seems to be happening is that a paragraph with the last line left or center aligned is actually giving that last line full justification. Is this a bug, or a 'feature' [:)] or am I missing something?
Any help much appreciated as always.
Jude Fisher
