Posted By

curiousmedia on 10/15/09


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

TrentSkunk
drala
shuchii


Enumerate Fonts - aka "What The Font"!?


 / Published in: ActionScript 3
 

Will output a list of fonts available in your movie by fontName. One use is to determine what string to use when using htmlText and tags.

  1. var embeddedFonts:Array = Font.enumerateFonts(false);
  2. embeddedFonts.sortOn("fontName", Array.CASEINSENSITIVE);
  3. trace("\n\n----- Enumerate Fonts -----");
  4. for(var i:int = 0; i<embeddedFonts.length; i++) {
  5. trace(embeddedFonts[i].fontName);
  6. }
  7. trace("---------------------------\n\n");

Report this snippet  

You need to login to post a comment.