2 Replies Latest reply on Aug 18, 2009 5:29 PM by phil1943

    font embedding ?

    phil1943 Level 1

      Hello, I want my user to be able to choose from a bold or italic font.

       

      Do I have to actually embed a bold and italic version of the font in my app for this to work ?

       

      What if I use a common system font such as Arial - do I still need to embed them ?

       

      thanks

        • 1. Re: font embedding ?
          babo_ya Level 3

          You don't have to embed them. just create css files for different options as below.

          and use the StyleManager to load seleted css file.

           

          eventDispatcher = StyleManager.loadStyleDeclarations("SelectedCSS.swf", true, false);

          eventDispatcher.addEventListener(StyleEvent.COMPLETE, styleLoadedHandler );

           

           

          Application

          {

             fontFamily: Arial";

             fontWeight: bold;

           

          }

           

          Application

          {

             fontFamily: Arial";

             fontWeight: normal;

           

          }

           

          Application

          {

             fontFamily: Arial";

             fontWeight: normal;

             text-decoration : underline;

           

          }

           

          hope this helps.

           

          BaBo,

          • 2. Re: font embedding ?
            phil1943 Level 1

            thanks very much, I have CSS loaded my font using "@font-face" rather than "application".

             

            I am now trying to apply it via a textrange command.

            eg. myTextRange.fontWeight="bold";

            I also tried to add myTextRange.fontFamily="Arial"

            Still no luck. It will not render.

             

            Am I missing out a step here, or do I have to first register the font or perform any other action before it can be applied via textRange commands ?

             

            thanks