         contentChanged = false;
         textChanged = false;
 
-        if (hostTextLayoutFormatInvalid)
-        {
-            for (var p:String in TextLayoutFormat.tlf_internal::description)
-            {
-                setHostTextLayoutFormat(p);
-            }
-            hostTextLayoutFormatInvalid = false;
-        }
-
-        checkEmbeddedFontContext();
+        var oldEmbeddedFontContext:IFlexModuleFactory =
+        	mx_internal::embeddedFontContext;
+        
+        // If the CSS styles for this component specify an embedded font,
+        // embeddedFontContext will be set to the module factory that
+        // should create TextLines (since they must be created in the
+        // SWF where the embedded font is.)
+        // Otherwise, this will be null.
+        mx_internal::embeddedFontContext = getEmbeddedFontContext();
+        
+        if (mx_internal::embeddedFontContext != oldEmbeddedFontContext)
+        {
+            textLineCreator =
+            	mx_internal::embeddedFontContext ?
+             	ITextLineCreator(mx_internal::embeddedFontContext) :
+                null;
+        }
+        
+        if (hostFormatChanged)
+        {
+        	hostFormat = new CSSTextLayoutFormat(this);
+        		// Note: CSSTextLayoutFormat has special processing
+        		// for the fontLookup style. If it is "auto",
+        		// the fontLookup format is set to either
+        		// "device" or "embedded" depending on whether
+        		// embeddedFontContext is null or non-null.
+        	
+        	hostFormatChanged = false;
+        }
 
         if (textFlow)
         {
-            textFlow.hostFormat = new TextLayoutFormat(hostTextLayoutFormat);
+            textFlow.hostFormat = hostFormat;
             
             // There should always be a composer but be safe.
             if (textFlow.flowComposer)
-                textFlow.flowComposer.textLineCreator = _textLineCreator;
+                textFlow.flowComposer.textLineCreator = textLineCreator;
         }
 
         return textFlow;

     *  @private
     *  Used for determining whitespace processing during import.
     */
    private static var staticTextLayoutFormat:TextLayoutFormat =
        new TextLayoutFormat();
    
    /**
     *  @private

		
        if (textFlow)
        {
            staticTextFlowFactory.createTextLines(
            	addTextLine, textFlow, textLineCreator);
        }
        else
        {
            // We know text is non-null since it got this far.
            staticStringFactory.text = mx_internal::_text;
            staticStringFactory.textFlowFormat = hostFormat;
            staticStringFactory.createTextLines(addTextLine, textLineCreator);
        }
        
        mx_internal::bounds = factory.measuredBounds;
