A quick tip for all not seeing their embeded fonts when compiling pure AS project with Flex SDK 4:

[Embed(source=“assets/fonts/my-cool-font.otf”, fontFamily=“CoolFont”, fontWeight=“normal”, mimeType=‘application/x-font’, embedAsCFF=‘false’)]

Notice the embedAsCFF=‘false’, this is the most important part. Basically when not using Spark Text Components (which are based on Text Layout Framework) you need this option.

In summary Halo Components or pure Actionscript Projects (TextField) need embedAsCFF=’false’ when embeding fonts in Flex4.

Comments

Comment by GaryGeo on 2010-08-11 06:55:41 +0300

Thanks for this… the embedAsCFF was giving me problems.

Comment by keithics on 2010-08-18 13:15:05 +0300

Thanks a lot!! I have been figuring out what in the world happened.

Comment by Nikita on 2010-11-30 19:29:52 +0300

Thank you, you’ve just saved the day :D
Couldn’t figure out why my fonts disappeared, turns our that’s embedAsCFF…

Comment by ugandhar on 2011-03-01 13:48:54 +0300

Thank you , you have just saved loft of time

Comment by nantitv on 2012-01-13 08:55:36 +0300

Great post .
Thnx dude.
This font problem took my 2hr

Comment by Mike on 2012-04-03 16:51:40 +0300

THANKS. Saved my life.

Comment by Jason on 2012-04-20 14:21:28 +0300

Thanks! This was driving me insane.