             hostTextLayoutFormatInvalid = false;
         }
 
+        checkEmbeddedFontContext();
         textFlow.hostFormat = new TextLayoutFormat(hostTextLayoutFormat);
         
         return textFlow;

        p.replaceChildren(0, 0, span);
        return textFlow;
    }
    
    /**
     *  @private
     */
    private function setHostTextLayoutFormat(styleProp:String):void
    {
        var checkForEmbed:Boolean = false;

        if (styleProp in hostTextLayoutFormat)
        {
            var value:* = getStyle(styleProp);

            if (styleProp == "tabStops" && value === undefined)
                value = [];

            if (styleProp == "fontLookup" && value == "auto")
                checkForEmbed = true;
            else
                hostTextLayoutFormat[styleProp] = value;
        }      
        if (checkForEmbed)
        {
            var embeddedFont:EmbeddedFont = getEmbeddedFont(
                hostTextLayoutFormat.fontFamily, 
                hostTextLayoutFormat.fontWeight == "bold", 
                hostTextLayoutFormat.fontStyle == "italic");
            
            embeddedFontContext = 
                embeddedFontRegistry.getAssociatedModuleFactory(
                    embeddedFont, moduleFactory);


    /**
     *  @private
     *  If the embeddedFontContext changed
     */
    private var embeddedFontContextChanged:Boolean;

    /**
     *  @private
     *  True if we need to compute the fontLookup
     */
    private var autoFontLookup:Boolean = false;

    /**
     *  @private
     */
    private var textFlow:TextFlow;
            
