![]() ![]() Why would you need to find a font from an image in the first place? You may find you want to replicate the font from your logo for a large banner. Why Would You Need to Find A Font From an Image? The problem is you don’t want to totally re-brand and yet you want to match the original font in the logo so closely that no one would be able to tell. Today I’m going to take you through the process of how I am able to identify a font in a logo and the easiest way to locate the font so i can then reproduce it in Adobe Illustrator or Photoshop and then create the logo size and quality required. If ( = LayerKind.TEXT)ĭ + "\n" +ĭ.rgb.If you want to know how to find fonts or identify a font from a logo image, let me share my simple tutorial with you. Var outputFile = new File(CurrentFolder + "/" + activeDocument.name + "fonts.txt" ) įor (var i = -1 i >=0 i-)ĭocRef.activeLa`enter preformatted text here`yer = docRef.layers Just save this like "ExportTexts.js" and put in Adobe Photoshop > Presets > Scripts.Īfter that, run (or restart) Photoshop and run script (File -> Scripts -> ExportTexts).Īlso make sure you ungrouped all layers before doing this.Įxported file should be in a same dir as psd file. 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |