Skip to main content
February 17, 2009
Answered

Text alignment with flast.text.engine

  • February 17, 2009
  • 1 reply
  • 716 views
Hi,

I am looking at the HelloWorld example for the FTE in the Text Layout Framework and I want to create a single block of text which is aligned right. How do I do this with the FTE classes NOT the Text Layout Framework???

Thanks

Glen
This topic has been closed for replies.
Correct answer rdermer
How about
textLine.x = totalWidth-textLine.textWidth

1 reply

rdermerCorrect answer
Adobe Employee
February 17, 2009
How about
textLine.x = totalWidth-textLine.textWidth
February 17, 2009
Thanks - bit of a rubbish hack to do something that used to be very simple, but it works...
Participating Frequently
February 24, 2009
FTE does the low-level work of laying out glyphs within a TextLine (including mapping Unicode characters to glyphs and implementing the bidirectional layout algorithm), not the high-level work of arranging TextLines relative to each other. It leaves the latter task to libraries such as TLF, so that they can implement complex algorithms like flowing-from-container-to-container or wrapping-text-around-an-image. These don't really belong in the Player because they are less clearly defined and need to evolve more quickly to meet the needs of various use cases.

So... even something as basic as laying out a block of right-aligned text is not something that FTE was designed to make effortless. A low-level package like FTE was designed for generality, not for ease-of-use.