package { import flash.text.*; import flash.display.MovieClip; public class FontClass extends MovieClip { [Embed(source="Arial Bold.ttf", fontName="myFont", embedAsCFF = "false",fontWeight="bold", advancedAntiAliasing="true", mimeType="application/x-font")] private var theClass:Class; public function FontClass () { var t:TextField=new TextField(); t.embedFonts = true; var textFormat:TextFormat=new TextFormat(); textFormat.size = "30"; textFormat.font = "myFont"; t.text = "[Embed] metadata rocks!!!"; t.width = 500; t.setTextFormat (textFormat); addChild (t); } } }
[Embed(systemFont="Letter Gothic Std",embedAsCFF = "false", fontName = 'lgsbFont', fontWeight="bold", advancedAntiAliasing="true", mimeType="application/x-font",unicodeRange="U+0000-U+007F")] private static var ArialFont: Class; var textFormat: TextFormat = new TextFormat("ArialRegular", 50, 0x0000FF); text1 = new TextField(); text1.embedFonts = true; text1.defaultTextFormat = textFormat; text1.autoSize = "left"; text1.text = "Thanh";