1 Reply Latest reply on Aug 19, 2010 7:54 AM by Flex harUI

    Embedded font is not rendered using TLF

    sebadam

      HI there,

       

      I am having a large problem using the TLF in a Flex 3.4 project.

      I am using an .otf font, compiled as .swf which i am embedding via a CSS Stylesheet that is also compiled to an swf and loaded during runtime.

       

      If I am using a regular Flex component like Text or Textarea the embedded font is displayed correctly.

      But if I use the same font with the TLF it does not get rendered. the TextFlow does display it as the System default font.

      I do not get any error messages.

       

      Here are some code excerts:

       

      CSS:

       

      @font-face

       

       

       

       

       

      {

       

       

       

       

       

       

      src: url("../fonts/MetaProFonts.swf");

       

      fontFamily: "MetaPro-Norm";

      }

       

      .lbHeadline

       

      {

       

      color: "0x003399";

       

      fontFamily: "MetaPro-Norm";

       

      fontWeight: "normal";

       

      fontSize: "18";

       

      paragraphSpaceBefore: "0";

       

      paragraphSpaceAfter: "0";

      }

       

      all Attributes except the font itself are being displayed correclty.

       

      Here the font is being displayed correctly

      <mx:Text

       

      text="This should be meta" styleName="lbHeadline"/>

       

       

      Whilst in the TLF it isn't

       

      I was trying this also by using the SimpleEditorWithCSS example from the TLF Site

       

      Any help would be appreciated.

       

      Thanks

       

      Sebastian