Find all the fonts used in a Photoshop file
Solution 1:
Depends on how you want to extract the information.
Per section or text area
Select the Text tool (T icon with serifs) and click on the text area to edit it. It will show what font is being used in the Character window.
All fonts used at a glance
- Save or export the image document as a PDF
- Open up the PDF version in Adobe Reader
- Select File → Properties → Fonts
This will list all the embeddable fonts used in the PSD file, provided you can embed them.
Missing fonts
In the Character tool, go to the font selection drop down. At the end of the list will be the fonts that are used in the image but are missing from your system. These will typically be greyed out.
Rastersized images
If you see any rasterized images you need the font face of, you'd best export just that section as a clear, standalone image and use a service like What the Font to determine the font.
Solution 2:
Save this script as a new file in your Photoshop > Presets > Scripts folder. Name it whatever you want, such as "Detect Fonts.jsx"
var p = new ActionReference();
function arrayUnique(a){
var t = []
i = a.length;
while(i--) {
var f = false,
n = t.length;
while (n--) {
if(a[i] === t[n]) {
f = true;
}
}
if(!f) {
t.push(a[i]);
}
}
return t;
}
function findFonts() {
p.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
var c = executeActionGet(p).getInteger(charIDToTypeID('NmbL'))+1,
fonts = [];
while(c--) {
var r = new ActionReference(),
descLayer,
layerStyles,
countStyles;
r.putIndex( charIDToTypeID( 'Lyr ' ), c );
try {
descLayer = executeActionGet(r);
} catch (e) {
continue;
}
if(!descLayer.hasKey(stringIDToTypeID( 'textKey' ))) continue;
layerStyles = descLayer.getObjectValue(stringIDToTypeID('textKey')).getList(stringIDToTypeID('textStyleRange'));
countStyles = layerStyles.count;
while(countStyles--) {
var n = layerStyles.getObjectValue(countStyles).getObjectValue(stringIDToTypeID('textStyle')).getString(stringIDToTypeID('fontPostScriptName'));
fonts.push(n);
}
}
return arrayUnique(fonts).sort();
}
if (documents.length) {
var d = findFonts();
alert(d.length +' fonts found\n'+d.join('\n'));
} else {
alert('No fonts used in the active document.',);
}
Solution 3:
The PSD file format is documented by Adobe - you can read how it stores font information.
You could then examine a hex dump of the file and use the file format specification to find the fonts.
Alternatively, the font names ought to be visible in the output of the strings
utility found on Linux/Unix systems.