Hi,
Because I found the right way to do that after I tested all kind of way to include a font in an actionscript 3 project with Flash Builder, here is the solution :
package { import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.text.TextFormat; import flash.text.AntiAliasType; public class sample { //Font //Add in The Embed Tag : embedAsCFF="false" [Embed(source="Your_Font.otf", fontName="myFont", mimeType = "application/x-font", unicodeRange="U+0020,U+0041-U+005A,U+0061-U+007A", embedAsCFF="false" )] private var font:Class; public function sample():void { var MyText:TextField = new TextField(); MyText.embedFonts = true; MyText.wordWrap = false; MyText.autoSize = TextFieldAutoSize.LEFT; MyText.antiAliasType = AntiAliasType.ADVANCED; MyText.text="My font Works !"; var MyTextFormat:TextFormat = new TextFormat("myFont",18,0xf0f0f0); MyText.setTextFormat(MyTextFormat); } } }
I hope it will help.
Denis P.