InDesign - 路径上丑陋的“阶梯”文本
平面设计
土坯设计
排版
2022-02-09 05:40:12
2个回答
我为您编写了一个示例脚本,以表明编写脚本并不难。脚本中有注释来解释发生了什么。
如果您想了解有关脚本结帐或 wiki 的更多信息
https://github.com/ExtendScript/wiki/wiki
/* global app, Text, alert*/
// the whole script assumes you have text selected with the cursor in the box
var doc = app.activeDocument; // get the current document
var sel = app.selection; // get the selection
// the next line holds the first selected object
// this is not the first character it is the first "group" of items
// hard to explain. It could also be the first rectangle of several
// the selection of text in a text box counts as one object
var txt = sel[0];
// lets check if it actually is a text object
if(txt instanceof Text) {
// loop each character in the selection
for(var i = 0; i < txt.characters.length; i++) {
var character = txt.characters[i]; // get the current character
// now here we use the baseline shift property
// to change the offset
// this is where your experiment comes in
character.baselineShift = character.baselineShift + (Math.random() * 5);
}
} else {
alert('Please select some text with the text tool');
}
其它你可能感兴趣的问题

