Photoshop CS JS What font is this?

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

Moderators: Kukurykus, Tom, xbytor

Larry Ligon

Photoshop CS JS What font is this?

Post by Larry Ligon »

This JavaScript will display the name, PostScript name, style and anti-alias of the active text layer font.
Select a text layer and run this script.

Save in a file named What Font.js

Code: Select alldocRef = activeDocument;

if (docRef.activeLayer.kind == LayerKind.TEXT)
{
alert("Font name is " + app.fonts[docRef.activeLayer.textItem.font].name + "\n" +
        "Postscript name is "+ app.fonts[docRef.activeLayer.textItem.font].postScriptName + "\n" +
       "Style is " + app.fonts[docRef.activeLayer.textItem.font].style+ "\n" +
        "Anti-alias is " + docRef.activeLayer.textItem.antiAliasMethod);
}
else
{alert("Active layer is not a text layer");
}