I came up with editing simple script, to export layer properties (text, font name, font size, font color) which you need when developing, to a single txt file (should work on Windows machine). Var n = textStyle.getString(stringIDToTypeID('fontPostScriptName')) Īlert(d.length ' fonts found\n' d.join('\n')) Īlert('No fonts used in the active document.') ĭeveloper asked me almost the same think like you needed. If(!textStyle || !textStyle.hasKey(stringIDToTypeID('fontPostScriptName'))) continue Var textStyle = layerStyles.getObjectValue(countStyles).getObjectValue(stringIDToTypeID('textStyle')) If (!descLayer.hasKey(stringIDToTypeID('textKey'))) continue Var c = executeActionGet(p).getInteger(charIDToTypeID('NmbL')) 1, P.putEnumerated(charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt')) I will also submit a pull request to var p = new ActionReference() Var n = layerStyles.getObjectValue(countStyles).getObjectValue(stringIDToTypeID('textStyle')).getString(stringIDToTypeID('fontPostScriptName')) Īlert(d.length ' fonts found\n' d.join('\n')) Īlert('No fonts used in the active document.',) īased on David's original answer (DetectFonts.jsx), I have modified the script to fix the issue reported by Drew in the comments: Find all the fonts used in a Photoshop file.įollow the original instructions but use this script body instead - only difference is a few null checks (presumably either a photoshop version difference or something to do with missing data on particular object types, likely designer or operating system specific) LayerStyles = descLayer.getObjectValue(stringIDToTypeID('textKey')).getList(stringIDToTypeID('textStyleRange')) If(!descLayer.hasKey(stringIDToTypeID( 'textKey' ))) continue R.putIndex( charIDToTypeID( 'Lyr ' ), c ) Var c = executeActionGet(p).getInteger(charIDToTypeID('NmbL')) 1, P.putEnumerated( charIDToTypeID('Dcmn'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') ) Name it whatever you want, such as "Detect Fonts.jsx" var p = new ActionReference() Save this script as a new file in your Photoshop > Presets > Scripts folder.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |