1 Reply Latest reply on Apr 8, 2011 12:32 PM by Flex harUI

    Compiled ActionScript Font SWF does not work with Sparks RichEditableText


      I am looking for any solutions or suggestions on how to resolve an issue that I am facing.  We have an application where we have
      created numerous ActionScripts that contain embed font definitions that are compiled to SWF's and stored in a database.  Our
      Application then retrieves the fonts from the database as needed, loads the SWF using Loader and then registers the font contained
      in the loaded Font SWF.  Since we are building a Flex 4 application, the Font SWF all have the embedAsCFF attribute set to true.
      The loaded and registered fonts work perfectly with Spark components such as Labels.   However, when we try to set the fontFamily,

      fontWeight and fontStyle using the setStyle method on the Sparks RichEditableText component, the textDisplay.textFlow property,
      or the individual Paragraph elements, the Font Style settings are totally ignored.  The interesting thing is, if I create CSS files with the
      same fonts and compile the CSS into SWF's which are in the bin-debug, loading this with the StyleManager.loadStyleDeclarations

      works with the RichEditableText. Unfortunately, the StyleManager.loadStyleDeclaration appears to require the "physical" SWF.  Our
      application requires the font SWF's be stored in a database and retrieved as binaries that are then loaded using the Loader.


      To eliminate the possibility of the Font being registered in a different application domain, I created a simple test application with a single


      So my questions are:


          1.  Does the Spark RichEditableText even support ActionScript based embed font SWF's


          2.  Is there a way to pass the StyleManager.loadStyleDeclaration a reference to a loaded SWF that is loaded in memory and
               does not physically reside with the application.


      Thanks in advance for any suggests