     //
     //--------------------------------------------------------------------------
 
-    private function checkEmbeddedFontContext():void
-    {
-        var embeddedFont:EmbeddedFont = getEmbeddedFont(
-            hostTextLayoutFormat.fontFamily, 
-            hostTextLayoutFormat.fontWeight == "bold", 
-            hostTextLayoutFormat.fontStyle == "italic");
-        
-        var oldEmbeddedFontContext:IFlexModuleFactory = embeddedFontContext;
-
-        if (autoFontLookup)
-        {
-            embeddedFontContext = 
-                embeddedFontRegistry.getAssociatedModuleFactory(
-                    embeddedFont, fontContext);
-
-            // if we found the font, then it is embedded. 
-            // Some fonts are not listed in info(), so are not in the above registry.
-            // Call isFontFaceEmbedded() which get the list of embedded fonts from the player.
-            if (embeddedFontContext != null) 
+    /**
+     *  @private
+     */
+    private function getEmbeddedFontContext():IFlexModuleFactory
+    {
+		var moduleFactory:IFlexModuleFactory;
+		
+		var fontLookup:String = getStyle("fontLookup");
+		if (fontLookup == "auto")
+        {
+			var font:String = getStyle("fontFamily");
+			var bold:Boolean = getStyle("fontWeight") == "bold";
+			var italic:Boolean = getStyle("fontStyle") == "italic";
+			
+			staticEmbeddedFont.initialize(font, bold, italic);
+            
+            moduleFactory = embeddedFontRegistry.getAssociatedModuleFactory(
+            	staticEmbeddedFont, fontContext);
+
+            // If we found the font, then it is embedded. 
+            // But some fonts are not listed in info()
+            // and are therefore not in the above registry.
+            // So we call isFontFaceEmbedded() which gets the list
+            // of embedded fonts from the player.
+            if (!moduleFactory) 
             {
-                hostTextLayoutFormat.fontLookup = FontLookup.EMBEDDED_CFF;
+                var sm:ISystemManager;
+                if (fontContext != null && fontContext is ISystemManager)
+                	sm = ISystemManager(fontContext);
+                else if (parent is IUIComponent)
+                	sm = IUIComponent(parent).systemManager;
+                              							
+                staticTextFormat.font = font;
+                staticTextFormat.bold = bold;
+                staticTextFormat.italic = italic;
+                
+                if (sm != null && sm.isFontFaceEmbedded(staticTextFormat))
+                    moduleFactory = sm;
             }
-            else
-            {
-                var sm:ISystemManager = creatingSystemManager();
-                var textFormat:TextFormat = new TextFormat();
-                textFormat.font = hostTextLayoutFormat.fontFamily;
-                textFormat.bold = hostTextLayoutFormat.fontWeight == "bold";
-                textFormat.italic = hostTextLayoutFormat.fontStyle == "italic";
-                if (sm != null && sm.isFontFaceEmbedded(textFormat))
-                {
-                    hostTextLayoutFormat.fontLookup = FontLookup.EMBEDDED_CFF;
-                }
-                else
-                {
-                    hostTextLayoutFormat.fontLookup = FontLookup.DEVICE;
-                }
-            }
         }
         else
         {
-            if (hostTextLayoutFormat.fontLookup == FontLookup.EMBEDDED_CFF)
-                embeddedFontContext = fontContext;
-            else
-                embeddedFontContext = null;
-        }
-        
-        // force us to re-create the textline factory
-        if (oldEmbeddedFontContext != embeddedFontContext)
-        {
-            _textLineCreator =
-                embeddedFontContext ?
-                ITextLineCreator(embeddedFontContext) : null;
-        }
-    }
-
-    /**
-     *  @private
-     */
-    private function setHostTextLayoutFormat(styleProp:String):void
-    {
-        if (styleProp in hostTextLayoutFormat)
-        {
-            var value:* = getStyle(styleProp);
-
-            if (styleProp == "tabStops" && value === undefined)
-                value = [];
-
-            if (styleProp == "fontLookup")
-            {
-                if (value == "auto")
-                    autoFontLookup = true;
-                else
-                {
-                    autoFontLookup = false;
-                    hostTextLayoutFormat[styleProp] = value;
-                }
-            }
-            else
-                hostTextLayoutFormat[styleProp] = value;
-        }      
-    }
-
+            moduleFactory = fontLookup == FontLookup.EMBEDDED_CFF ?
+                			fontContext :
+            				null;
+        }
+        
+        return moduleFactory;
+    }
+        
     /**
      *  @private
      */

 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
public class RichText extends TextGraphicElement implements IFontContextComponent
{
    include "../core/Version.as";


    {
        super.styleChanged(styleProp);

        hostFormatChanged = true;
    }

    //--------------------------------------------------------------------------
