Listing all embedded and device fonts
package{
import flash.display.Sprite;
import flash.text.*;
public class Main extends Sprite{
public function Main(){
var fonts:Array = Font.enumerateFonts(true);
fonts.sortOn("fontName", Array.CASEINSENSITIVE);
for (var i:int = 0; i < fonts.length; i++) {
trace(fonts[i].fontType + ": "
+ fonts[i].fontName + ", " + fonts[i].fontStyle);
}
}
}
}
Related examples in the same category