3 Replies Latest reply on Apr 22, 2010 9:27 PM by spireality

    OTFs in Flash

    spireality

      I've done a few searches on this and I'm not left with much. Relenting to the fact that I could not use my fancy OTF font in Flash wasn't too horrible since it was just one word that I could import as a path from Photoshop.

       

      But, now it turns out that the font for all the other text in this sequence (Myriad Pro) is also not showing up in the font list in Flash...

        >>:oQ  

       

      WHY!!???!!!???!!???!?!?!?!?!?!?!!?!!??!?!?!?!??!?!?   

       

      This makes NO sense - at all. Why can't you use OTF fonts in Flash? This stupid program flaw is going to F up my whole project - I'm not going to import all these sentences as shapes, and there is not another font to substitute it with.

       

      What the F, Adobe?

       

      Please say there is a way to fix this...

       

        • 1. Re: OTFs in Flash
          Harry Kunz Level 4

          Flash supports embedding both OTF and TTF font formats. How did you embed the font?

          • 2. Re: OTFs in Flash
            spireality Level 1

            Welp, it's static text, so no embedding going on here. Is there a surefire way to call it in with AS3?

            • 3. Re: OTFs in Flash
              Harry Kunz Level 4

              Let's try using dynamic textfields instead. First create a folder "Fonts" where your fla resides then copy AGENCYR.TTF from WINDOWS/Fonts and place it into "Fonts" and test if this code works. If it does, then try using your font instead. There might pop up a prompt telling you some Flex SDK is required but just pick "update library path" then run it again. It should embed the font.

               

               

              [Embed(source="Fonts/AGENCYR.TTF", fontFamily="Your Font Family", fontStyle = "Regular", mimeType="application/x-font-truetype")]

              var font:Class;

              var cText:TextField = new TextField();

              cText.embedFonts = true;

              cText.width = 200;

               

              var cTxtFmt:TextFormat = new TextFormat();

              cTxtFmt.font = "Your Font Family";

              cTxtFmt.color = 0x0000FF;

              cTxtFmt.size = 20;

               

              cText.defaultTextFormat = cTxtFmt;

              cText.text="Hello World!";

              addChild(cText);