Listing all fonts used in PSD

KC
Posted By
Ken_Cool
Jan 13, 2007
Views
98449
Replies
22
Status
Closed
Is there a way to list all the fonts used in PSDs?
since it will be easier to give them to the publisher or at least provide them in advance in case of sharing PSDs to other people.

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

LL
Larry_Ligon
Jan 13, 2007
This script requires Photoshop CS or above. It will not work in version 7.

Cut and paste the code below into Notepad and save it as text only in "List Fonts.js".
Place the file into the folder: C:\Program Files\Adobe\Photoshop CS\Presets\Scripts

//—-code——-
// 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[i].name + ", " + app.fonts[i].postScriptName+ "\n");

}

//Close the Excel comma delimited file

nufile.close();

alert("Excel Font List file created");

//—-code——-

You can then open Photoshop and run the script.

Larry
BL
Bob Levine
Jan 13, 2007
Save it as a PDF. Open in Acrobat/Reader and check the document properties.

Bob
LL
Larry_Ligon
Jan 13, 2007
Oops! I didn’t answer the question you asked. Senior moment.

This script requires Photoshop CS or above. It will not work in version 7.

Cut and paste the code below into Notepad and save it as text only in "List fonts in PSD document.js".
Place the file into the folder: C:\Program
Files\Adobe\PhotoshopCS\Presets\Scripts

//—-code——-

if (documents.length > 0)
{
// Tell Photoshop not to display any dialogs.
//displayDialogs = DialogModes.NO;
// Create a reference to the active document.
var docRef = activeDocument;
CurrentFolder = activeDocument.path;
// Loop through the layers one at a time. docRef.layers.length contains the number of
// layers including the background.
//Create the Excel comma delimited file in the current folder var nufile = new File(CurrentFolder + "/" + activeDocument.name + " Fonts Used.csv" );
nufile.open("w");
nufile.write("Font Name,Font Post Script Name" + "\n"); for (var i = docRef.layers.length-1 ; i >=0 ; i–)
{
// Set the active layer to the next layer in the loop.
docRef.activeLayer = docRef.layers[i]
if (docRef.activeLayer.kind == LayerKind.TEXT)
{
nufile.write( app.fonts[docRef.activeLayer.textItem.font].name +"," + app.fonts[docRef.activeLayer.textItem.font].postScriptName + "\n"); }
}
//Close the Excel comma delimited file
nufile.close();
alert("Finished");
}
else
{
// Gives this message if you don’t have a document open in Photoshop. alert("You must have at least one open document to run this script! "); }
// Set the objects to nothing to release to the system.
docRef = null

//—-code——-

You have to save your image to a folder before running this script. So that the script can read the destination folder. Otherwise, you’ll get an error message.

Larry
KC
Ken_Cool
Jan 14, 2007
thanks for you help guys!
for the script larry, it’s good, although it doesn’t work for psd with many non-text layers, it doesn’t show any result, and perhaps the cause might be this: layers are inside a group, so it doesn’t show any…hope you can make some modifications for that!
LL
Larry_Ligon
Jan 14, 2007
It only list the fonts used in the PSD. It ignores non-text layers.

Are you talking about layersets?

Larry
DM
Don_McCahill
Jan 14, 2007
Oops! I didn’t answer the question you asked. Senior moment.

Larry

Does the first script list all the fonts used in Photoshop (fonts available)?
LL
Larry_Ligon
Jan 14, 2007
Does the first script list all the fonts used in Photoshop (fonts
available)?

Yes. All the fonts that Photoshop shows in the font drop down list box.

Larry
JJ
John Joslin
Jan 15, 2007
I think the OP wanted to list just the fonts used in the file.

Like "Collect for Output" in FreeHand. 😉
LL
Larry_Ligon
Jan 15, 2007
I think the OP wanted to list just the fonts used in the file.

That’s what the second script does!

Larry
JJ
John Joslin
Jan 15, 2007
Thanks.
JO
Jim_Oblak
Jan 15, 2007
Save it as a PDF. Open in Acrobat/Reader and check the document properties.

Aren’t all other options presented in this thread a violation of licensing for the fonts if you pack them with the PSD file? Aren’t all other options presented in this thread an invitation for meddling of others in your art?

Maybe this is not an automated function of Photoshop because it is so much easier to transmit PDF files.
BL
Bob Levine
Jan 15, 2007
Aren’t all other options presented in this thread a violation of licensing for the fonts if you pack them with the PSD file?

Depends on the circumstances and the EULA for the font. Adobe’s EULA allows you to package fonts and transfer them to a printer if the printer already had a license for the font.

The reason for this is to make sure that both parties are using the same version of the font. Fonts, like other software, are updated from time to time and a small change can be big trouble.

Bob
DM
Don_McCahill
Jan 15, 2007
Yes. All the fonts that Photoshop shows in the font drop down list box.

That is also a cool hack, and I’m glad you misread the post. I can see a use for it.
LL
Larry_Ligon
Jan 15, 2007
When you save a image as a PDF in CS, you can embed the fonts. You can’t do this in CS2!

Larry
KC
Ken_Cool
Jan 20, 2007
sorry for the late reply…when layers are member of a group or set, it seems that text layers are ignored and as a result, no font is listed
LL
Larry_Ligon
Jan 21, 2007
That is going to require a recursive algorithm. My computer crashed and I’m trying to recover. It may take several weeks before I can look at this again.

Check back here later.

Larry
KC
Ken_Cool
Jan 26, 2007
well, thanks sir larry, hope to see your post soon! thanks for the time
DM
dave_milbut
Jan 26, 2007
larry, while not up on all the ps specific code, i’m a pretty proficient programmer. if you want to send me what you’ve got, with the ps specifics intact, i can see if i can help you out on this one…

aikodude at yahoo dot com, if you wish.

dave
LL
Larry_Ligon
Feb 2, 2007
Ken,

After looking at this some more, I’ve discovered that you don’t need a script to tell you what fonts are used in a PSD file. You can save the image as a PDF image. Then you can open up the PDF version in your Acrobat reader. Select File>Document properties… The fonts used will be listed.

If you use Layer Comps, you have to select the desired Layer Comp in Photoshop. Then you can save that as a PDF. This PDF will contain only the visible text layers that are in that particular Layer Comp. You can then look at the Document properties… to see what fonts are used in that particular Layer Comp.

This works with nested layersets(groups).

Larry
BL
Bob Levine
Feb 2, 2007
I posted that weeks ago.

Bob
LL
Larry_Ligon
Feb 2, 2007
My computer crashed so I didn’t see that message. Just to let him know that I won’t be writing a script to do this!

Larry
KC
Ken_Cool
Feb 10, 2007
well, thanks for all of your tips guys!

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

Related Discussion Topics

Nice and short text about related topics in discussion sections