AS3 Show Embedded Fonts


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. import flash.text.Font;
  2.  
  3. public function showEmbeddedFonts():void {
  4. trace("========Embedded Fonts========");
  5. var fonts:Array = Font.enumerateFonts();
  6. fonts.sortOn("fontName", Array.CASEINSENSITIVE);
  7. for (var i:int = 0; i < fonts.length; i++) {
  8. trace(fonts[i].fontName + ", " + fonts[i].fontStyle);
  9. }
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.