2 Replies Latest reply on Oct 5, 2010 3:12 PM by Harry Kunz

    Font Embedding Issue when SWF loaded in Loader

    Harry Kunz Level 4

      Hi.

       

      I ran into a font embedding issue where all the  text fields with the embedded font disappear when the SWF is loaded as a  child into a parent SWF. When the SWF is played directly as stand alone  or inside an HTML page container, the text fields display perfectly  with the embedded fonts. Just not if that SWF is loaded into another  SWF. This is basically how i embedded the font:

       

      [AS inside document class]

       

      [Embed(source="/Library/Fonts/Arial.ttf", fontName="FontVerdana", mimeType="application/x-font-truetype")]

      public static const FontVerdana:Class;

       

      var theFont* = new FontVerdana();

      var myText:TextField = new TextField();

      var fmt:TextFormat = new TextFormat();

      fmt.font = theFont;

      myText.embedFonts = true;

      myText.setTextFormat(fmt);

       

      By the way i'm working on a Mac using Flex 3.5. Did anyone else encounter this issue? What can be done to resolve this?

       

      Cheers,

      Harry