2 Replies Latest reply on Jun 8, 2010 6:05 AM by Karthik@Chennai

    Regarding Embedded Fonts

    Karthik@Chennai Level 1

      Hi All,

      Iam planning to use Embedded Fonts in my application instead of default system fonts.Please guide me on  related articles and issue w.r.t embedded fonts.

      regards

      karthik

        • 1. Re: Regarding Embedded Fonts
          jp77

          A base that should help you get started:

           

          1) Find the font files that you like to embed (windows - control panel fonts) and copy them to a folder inside your project, they should have the extension '.otf'  (some fonts require licenses so look into that if you are not sure).

           

          2) I created a css file to embed my fonts. The structure looked something like this:

           

          /* embedded fonts */
          @font-face
          {
          src: url("../assets/fonts/MyriadProRegular.otf");
          fontFamily: MyriadProReg;
          embedAsCFF: true;
          }

           

          @font-face
          {
          src: url("../assets/fonts/MyriadProSemiBold.otf");
          fontFamily: MyriadProSemiBold;
          embedAsCFF: true;
          }

           

          s|Label.miniJobMainTitle
          {
          color: #FD7904;
          fontFamily: MyriadProSemiBold;
          fontSize: 16;
          }


          s|RichEditableText.miniJobDesc
          {
          fontSize: 12;
          fontFamily: MyriadProReg;
          text-align:left;
          }

           

          3. Then in your mxml/as file attached the style you declared above:

           

          <s:Label text="blah blah blah" styleName="miniJobDesc" />

          <s:span fontSize="14" fontFamily="MyriadProSemiBold" color="#0098FF">Job Location:</s:span>

           

          I am sure it can get more complicated than this, but it should get you off to a good start.

           

          Hope that helps,

           

          JP

          • 2. Re: Regarding Embedded Fonts
            Karthik@Chennai Level 1

            Hi JP,

            Thanks for the post.But in some articles refer to use an external flash movie file(assets/fonts.swf)  instead of ".otf" . Any difference between this two approach ???

            regards,

            karthik