Skip to main content
Participant
November 16, 2009
Question

Text Align ignores whitespaces

  • November 16, 2009
  • 1 reply
  • 391 views

Hi.

I have a problem with text align in text field.

Let's say that I have a text field with htmlText:

"Text example          "

- when I set align for this text field like this:

var _format:TextFormat = new TextFormat();
_format.align= TextFormatAlign.CENTER;
  
text_field.setTextFormat(_format);

- it ignores whitespaces at the end of the line.

Same thing for TextFormatAlign.RIGHT.

Can I change this behavior using new text layout framework?

This topic has been closed for replies.

1 reply

November 16, 2009

I don't think you can. TLF ignores trailing spaces when aligning text as well. And the decisions for where a glyph appears on a line are in the Player - not our actionscript code - so there isn't a way to override this in TLF.