最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Photoshop Script to change Font and Font Size - Stack Overflow

programmeradmin6浏览0评论

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 0
Add a ment  | 

1 Answer 1

Reset to default 6

This 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");
    }
}
}
发布评论

评论列表(0)

  1. 暂无评论