/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var embeddedFontsArray: Array = Font.enumerateFonts(false); for (var i:uint = 0; i < embeddedFontsArray.length; i++) { trace("fontName: " + embeddedFontsArray[i].fontName); } var t:TextField = new TextField(); addChild(t); var tf:TextFormat = new TextFormat(); tf.font = "Verdana"; tf.size = 14; t.embedFonts = true; t.defaultTextFormat = tf; t.antiAliasType = AntiAliasType.ADVANCED; t.text = "Verdana"; t.autoSize = TextFieldAutoSize.LEFT; stop();