0 Replies Latest reply on Feb 8, 2012 1:37 PM by Zolotoj

    Embedding fonts

    Zolotoj Level 3

      Here is my code I am trying to use to embed a font:

      import flash.text.Font;

         

          public class passwordFont extends Font

          {

              [Embed(source="/../src/asset/fonts/ALGER.TTF",

                          fontFamily="passwordFont",

                          mimeType="application/x-font",

                          embedAsCFF="true")]

              public var _font:String;

             

              public var NAME:String = "passwordFont";

             

              public function passwordFont()

              {

                  super();

                  _font;

              }

          }

       

      and then:

      inputa = new TextArea();

      inputa.setStyle("fontFamily", "passwordFont");

       

      nothing. What am I doing wrong?

       

      Thanks