         return NaN;
     }
 
-	//--------------------------------------------------------------------------
-	//
-	//  Constructor
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  Constructor. 
-	 */
-	public function TextBox()
-	{
-		super();
-	}
-	
-	//--------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor. 
+     */
+    public function TextBox()
+    {
+        super();
+    }
+    
+    //--------------------------------------------------------------------------
     //
     //  Variables
     //
     //--------------------------------------------------------------------------
-	
-	/**
-	 *  @private
-	 */
-	private var textBlockComposer:TextBlockComposer = new TextBlockComposer();
-
-	//--------------------------------------------------------------------------
-	//
-	//  Overridden methods: GraphicElement
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @inheritDoc
-	 */
+    
+    /**
+     *  @private
+     */
+    private var textBlockComposer:TextBlockComposer = new TextBlockComposer();
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: GraphicElement
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @inheritDoc
+     */
     override protected function measure():void
     {
         super.measure();

        elementFormat.kerning = String(kerning);
    }

	/**
	 *  @private
	 */
    private function setTracking(elementFormat:ElementFormat):void
    {
        var trackingLeft:Object = getStyle("trackingLeft");

        var height:Number = !isNaN(explicitHeight) ? explicitHeight : Infinity;
        compose(width, height);

        var r:Rectangle = textBlockComposer.actualBounds;
        measuredWidth = Math.ceil(r.width);
        measuredHeight = Math.ceil(r.height);
    }
        
    /**
     *  @inheritDoc
     */
    override protected function updateDisplayList(unscaledWidth:Number, 
                                                  unscaledHeight:Number):void
    {
        super.updateDisplayList(unscaledWidth, unscaledHeight);

        compose(unscaledWidth, unscaledHeight);
    }

    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------
    
    /**
     *  @private
     */
    private function compose(width:Number = Infinity,
                             height:Number = Infinity):void
    {
        var fontDescription:FontDescription = new FontDescription();
        fontDescription.cffHinting = getStyle("cffHinting");
        fontDescription.fontLookup = getStyle("fontLookup");
        fontDescription.fontName = getStyle("fontFamily");
        fontDescription.fontPosture = getStyle("fontStyle");
        fontDescription.fontWeight = getStyle("fontWeight");
        fontDescription.renderingMode = getStyle("renderingMode");
        
        var elementFormat:ElementFormat = new ElementFormat();
        elementFormat.alignmentBaseline = getStyle("alignmentBaseline");
        elementFormat.alpha = getStyle("textAlpha");
        elementFormat.baselineShift = getStyle("baselineShift");
        elementFormat.color = getStyle("color");
        elementFormat.digitCase = getStyle("digitCase");
        elementFormat.digitWidth = getStyle("digitWidth");
        elementFormat.dominantBaseline = getStyle("dominantBaseline");
        elementFormat.fontDescription = fontDescription;
        elementFormat.fontSize = getStyle("fontSize");
        setKerning(elementFormat);
        elementFormat.ligatureLevel = getStyle("ligatureLevel");
        elementFormat.locale = getStyle("locale");
        elementFormat.textRotation = getStyle("textRotation");
        setTracking(elementFormat);
        elementFormat.typographicCase = getStyle("typographicCase");
        
        textBlockComposer.removeTextLines(
            DisplayObjectContainer(displayObject));
        
        var bounds:Rectangle = textBlockComposer.requestedBounds;
        bounds.x = 0;
        bounds.y = 0;
        bounds.width = width;
        bounds.height = height;

        textBlockComposer.lineHeight = getStyle("lineHeight");
        textBlockComposer.paddingBottom = getStyle("paddingBottom");
        textBlockComposer.paddingLeft = getStyle("paddingLeft");
        textBlockComposer.paddingRight = getStyle("paddingRight");
        textBlockComposer.paddingTop = getStyle("paddingTop");
        textBlockComposer.textAlign = getStyle("textAlign");
        textBlockComposer.verticalAlign = getStyle("verticalAlign");

        textBlockComposer.composeText(text, elementFormat);
                
        textBlockComposer.addTextLines(DisplayObjectContainer(displayObject));
    }

    /**
     *  @private
     */
    private function setKerning(elementFormat:ElementFormat):void
    {
        var kerning:Object = getStyle("kerning");
