Wednesday, October 6, 2010

Font Embedding Tip

If font embed metadata  stopped working “not showing the font when test movie or publish ” in Flash CS5  when it used to work just fine in Flash CS4 that’s because Flash CS4 embeds DefineFont3 tags while Flash CS5 embeds DefineFont4 tags.

DefineFont4 is mainly used with TLF to to selectively embed glyphs from a font for use in Text Layout Framework(TLF), also known as font subsetting while DefineFont3 is more for classic fonts.

There are a few ways to fix this problem. First, there is an optional parameter to the [Embed] tag for fonts that specifies which type of font tag to create. Add embedAsCFF="false" to the list of parameters in the embed tag to do this.

[Embed(source="Verdana.ttf", embedAsCFF= "false", fontFamily="_Verdana")]

Another option, if you do not want to change all of your [Embed] tags, is that you can edit the FlexInfo.xml file copied into your user local settings directory (e.g. C:\Users\taljaber\AppData\Local\Adobe\Flash CS5\en_US\Configuration\ActionScript 3.0\FlexInfo.xml for me on win7) and edit that file by uncomment the line that sets the compatibility version to 3.0 at the end of that file. I'm not sure what other side effects this change might have, but it definitely forces all embedded fonts to be embedded as DefineFont3 tags.

I would recommend updating the [Embed] tag for fonts to do embedAsCFF="false".



3 comments:

  1. Thanks a bunch, this made my custom font work (again) in my program.

    ReplyDelete
  2. Thanks *= 10e6!! Extremely helpful and voodoo-free! Why doesn't Adobe provide such clearly needful and useful information?

    Cheers - Chas

    ReplyDelete
  3. wow, thanks so much. I was ready to throw my laptop out the window because none of the embedding recipes on the web were working for me. embedAsCFF= "false" fixed everything.

    ReplyDelete