Posts Tagged ‘TLF’

Embed Font in Flex4 Actionscript Project

Sunday, April 25th, 2010

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')]
private var MyCoolFont:Class;

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.