Write list of fonts to an Excel file in Photoshop CS JS

Photoshop Script Snippets - Note: Full Scripts go in the Photoshop Scripts Forum

Moderators: Kukurykus, Tom, xbytor

Larry Ligon

Write list of fonts to an Excel file in Photoshop CS JS

Post by Larry Ligon »

The following JavaScript will write out the fonts that you have installed on your computer. When you create text in JavaScript you have to use the PostScript name of the font instead of the name in the drop-down list. Sometimes these are the same but some have a different PostScript name.
This only works in Photoshop CS.

Code: Select all// Ask user for output folder
var inputFolder = Folder.selectDialog("Select a destination folder for Excel font list file");

//Create the Excel comma delimited file in the selected folder
var nufile = new File(inputFolder  + "/" + "FontList.csv" );
  nufile.open("w");

nufile.write("Font Name,Font Post Script Name" + "\n");

for (var i = 0 ; i <=app.fonts.length-1 ; i++)
  {
      nufile.write( app.fonts.name + ", " + app.fonts.postScriptName+ "\n");
   }

//Close the Excel comma delimited file
nufile.close();

alert("Excel Font List file created");