AS3: Show Embedded Fonts function


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



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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.