actionscript-3fontsairfdt

How to embed a font using FDT (AIR SDK 3.9) embedAsCFF="false" not recognised


I'm attempting to embed a font using FDT. I notice that FDT doesn't recognise the embedAsCFF="false" parameter.

(see: http://bugs.powerflasher.com/jira/browse/FDT-1853?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aworklog-tabpanel )

I'm doing something like this:-

[Embed(source="fonts/RobotoCondensed-Light.ttf", fontFamily="RobotoCondensedLight", embedAsCFF="false")]
tf.embedFonts = true;
tf.htmlText = '<font face="RobotoCondensedLight">Hello</font>';

Without embedAsCFF, no text appears. But RobotoCondensedLight is listed in Font.enumerateFonts()

With embedAsCFF - I get a compile errors: exception during transcoding, unable to build font 'RobotoCondensedLight', and Unable to transcode fonts/RobotoCondensed-Light.ttf.

I assume the problem is the embedAsCFF parameter - or is it something else?

How are people embedding fonts with FDT?


Solution

  • It turns out that the solution is to use the ASC 2.0 compiler. While it doesn't work with the old compiler (and apparently, it doesn't work from the command line either) - but the new compiler fixes the problem.