Looking for a script that changes all text within a PSD to be a certain font size and font kind, in this particular case, 'AbrilFatface-Regular'@ 101px. I then want to use this script to batch change hundreds of files using the same font and size (so no need for a prompt).
Thanks!
Looking for a script that changes all text within a PSD to be a certain font size and font kind, in this particular case, 'AbrilFatface-Regular'@ 101px. I then want to use this script to batch change hundreds of files using the same font and size (so no need for a prompt).
Thanks!
Share Improve this question asked Mar 9, 2015 at 17:22 dontdaddontdad 811 silver badge7 bronze badges 01 Answer
Reset to default 6This works like a champ:
if(app.documents.length != 0){
var doc = app.activeDocument;
for(i = 0; i < doc.artLayers.length; ++i){
var layer = doc.artLayers[i];
if(layer.kind == LayerKind.TEXT){
layer.textItem.font = "REPLACE WITH POSTSCRIPT FONT NAME";
layer.textItem.size = new UnitValue(REPLACE WITH FONT SIZE, "px");
}
}
}