After working for a few hours on a brand new all customizable slideshow I'm developing for a website, I decided I wanted to embed some fonts into my code.
This is easy stuff, but my friends, there's a catch, reading around the internet I found there might be a bug with the transcoder.
The embedding code is the following
[Embed(source='assets/My Font.ttf',Then you just have to use
fontName='myFont',
embedAsCFF='true'
)]
private var MyFont :Class;
textFormatter.font = myFont;
<fonts>
<managers>
<manager-class>flash.fonts.AFEFontManager</manager-class>
<manager-class>flash.fonts.BatikFontManager</manager-class>
<manager-class>flash.fonts.JREFontManager</manager-class>
</managers>
</fonts>
The actual font manager that's working is the AFEFontManager, so that's the one we want on the top. Though I read somewhere that some people managed to get it to work by changing the managers position on the list.
Don't forget to use
myTextField.embedFonts = true;
Another thing, I've seen that not all the fonts work, usually ttf will work but not always though. If anyone can explain me why is that it would be great.