Listing all embedded and device fonts : Font : TextField Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » TextField » Font »

 

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);
        }

    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo TextField
» Font