1 Reply Latest reply on Sep 28, 2006 6:29 PM by leotemp

    Font embed issue

      I have followed the instructions on the help file to place the following code in my Flex 2 app:

      <mx:Script>
      [Embed(mimeType='application/x-font', source='/BIN/PRISTINA.TTF', fontName='PRISTINA')]
      // This variable is not used. It exists so that the compiler will link // in the font.
      private var myfontClass:Class

      //import mx.managers.SystemManager;


      </mx:Script>

      <mx:Style>
      @font-face {
      src: url("bin/PRISTINA.TTF");
      fontFamily: myFont;
      }
      </mx:Style>

      Now when I set the font family for labels and the such and run the application the font is applied. However I cannot see the look of the font in design or in the FontFamily drop down in design mode. This is extremely frustrating for designing applications since I would have to run the application each time just to see what the font looks like. Is there something I am missing here that is causing the font to not be visually reflected in design mode?
        • 1. Re: Font embed issue
          leotemp Level 1
          Im pretty sure it will never be rendered. Basically flex builder is pretty counter intuitive and clunky when it comes to design, at least thats my opinion, i am by no means an expert. Theres a ton of frustrating things about it especially when compared to the quality of adobes other applications. I found that when i used embedded fonts i just had to experment in the browser to find the right position and size, really sucks but i am guessing there is some "brainiac" reason for this that goes way beyond my hindered understanding.