Using CS2, is there not a quicker way to get the postscript name of a font than looping over all installed fonts and comparing names?
function gimmePostScriptFontName(f)
{
numOfFonts = app.fonts.length;
for (var i = 0, numOfFonts; i < numOfFonts; i++)
{
fnt = app.fonts[i].name;
if (f == fnt)
{
return app.fonts[i].postScriptName;
}
}
}