I want to choose a random font from my installed fonts and apply it to a text box. I am using basil.js to facilitate coding.
I don't want to write a list of all available fonts by myself, like this:
var font = [];
font[0] = "Times New Roman";
font[1] = "Myriad Pro";
font[2] = "Impact";
b.textFont( font[Math.floor(Math.random()*font.length)] );
(this idea is from: http://forums.adobe.com/thread/325180)
Many Thanks!