4 Replies Latest reply on Dec 9, 2013 10:44 AM by sinious

    Can I embed OpenType fonts in Flash CS 5.5?

    bunner bob

      I just reopened an old-ish Flash project and the fonts aren't working. The project was worked on previously in CS 3 or 4 - don't recall - on a Mac running some earlier version of OS X. I'm currently running Lion and Flash CS 5.5, and some of the fonts aren't embedding or rendering. The project is using Postscript fonts.


      I thought I read that TrueType fonts are more reliable, but the font I need (Akzidenz Grotesk) is not available in TrueType, only OpenType.


      Am I safe to buy and use this in OpenType format? It's several hundred dollars so want to be sure before blowing the money. I think I'm looking at this version, which seems to be the smallest/cheapest I can get away with: http://www.linotype.com/265010/AkzidenzGroteskStdValuePack-product.html



        • 1. Re: Can I embed OpenType fonts in Flash CS 5.5?
          sinious Most Valuable Participant

          I've embedded plenty of OpenType without issue at all. I see it's OT CFF in the drop-down so you might want to try an embed declaration:



              fontName = "myFont",

              mimeType = "application/x-font",








          Take special note of the last directive to embed the font as CFF. Make sure your TextFields are assigned that font and told to embed.

          1 person found this helpful
          • 2. Re: Can I embed OpenType fonts in Flash CS 5.5?
            bunner bob Level 1

            Thanks. I'm actually using the Font Embedding panel in Flash. Seems to be working though I can't get any of the variations to work.


            I create a new font in the Font Embedding panel, choose my font and weight (trying Myriad Pro and Myriad Pro Italic), export for actionscript (AS classes fontNormal1 and fontItalic1).


            Then in the class where I do my formatting, up top I have:


            private var fontNormalFont1:String = 'Myriad Pro';

            private var fontItalicFont1:String = 'Myriad Pro Italic';


            In my constructor I have:





            Then I create my text format:


            fmtMainTitle:TextFormat = new TextFormat();

            fmtMainTitle.color = 0xffffff;

            fmtMainTitle.font = fontNormalFont1;

            fmtMainTitle.size = 18;


            Which I subsequently apply to text fields (including an embed font directive). It works great if my font is fontNormalFont1, but if I try fontItalicFont1 it comes up blank - no text appears.


            I tried creating an instance of the AS class for the italic font, and getting the font name:


            fontItalicInst:Font = new fontItalic1();



            And I get back "Myriad Pro" - in other words it's only returning the base font name, not the full name.


            I'm pretty rusty at AS/Flash, and fonts were never my strong suit, so I could be doing all the the wrong way. I do need to have fonts available in CSS, which could be why I'm registering the fonts (it's been a few years since I built this app).


            Would appreciate any advice


            - Bob

            • 3. Re: Can I embed OpenType fonts in Flash CS 5.5?
              bunner bob Level 1

              Actually I worked it out, thanks to this very helpful post explaining how to embed fonts in CS5:



              Turns out the fonts that weren't working (weren't being called properly via CSS) needed to have both font-family and font-style (italic) or font-weight (bold) set in the CSS.


              Used to be that I referenced them only by font family: Berthold Akzidenz BE Italic


              Now I have to split the attributes:

              font-family: Berthold Akzidenz BE

              font-style: italic


              Works great now.

              • 4. Re: Can I embed OpenType fonts in Flash CS 5.5?
                sinious Most Valuable Participant

                Yes I hope they consolidate the panel a bit more, even as of CS6 they're still requiring each font and all variants to be embedded separately. If I check bold or italic it shouldn't be a stretch for Flash to at least try to identify that variant, even show me a "confirm" dialog with what it thinks is the correct font group and auto-include the correct font and variants.


                Be sure to specify the unicode range to embed or those files will get large mighty quick.


                Glad you found your solution. Good luck!