public class Main extends Sprite{ public function Main(){ var fontName:String = "Verdana"; var font:Font; var fonts:Array = Font.enumerateFonts(true); for (var i:int = 0; i < fonts.length; i++) { if (fonts[i].fontName == fontName) { font = fonts[i]; break; } } trace(font.hasGlyphs("Hello world")); // Displays: true // trace(font.hasGlyphs()); // Displays: false } } }
Related Scripts with Example Source Code in same category :