Answers:
除非您要打破“反分裂主义”,否则这是更快的方法。
这可以通过脚本功能来完成。
编辑:我已经尝试和测试以下更新我的答案。
splitText.jsx的内容
// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop
// in case we double clicked the file
app.bringToFront();
// debug level: 0-2 (0:disable, 1:break on error, 2:break at beginning)
// $.level = 0;
// debugger; // launch debugger on next line
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.POINTS;
var thisDocument = app.activeDocument;
// USE THIS LINE TO GRAB TEXT FROM EXISTING LAYER
var theOriginalTextLayer = thisDocument.artLayers.getByName("NAME-OF-LAYER");
var theTextToSplit = theOriginalTextLayer.textItem.contents;
// OR USE THIS LINE TO DEFINE YOUR OWN
// var theTextToSplit = "Hello";
// suppress all dialogs
app.displayDialogs = DialogModes.NO;
// the color of the text as a numerical rgb value
var textColor = new SolidColor;
textColor.rgb.red = 0;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;
var fontSize = 120; // font size in points
var textBaseline = 480; // the vertical distance in pixels between the top-left corner of the document and the bottom-left corner of the text-box
for(a=0; a<theTextToSplit.length; a++){
// this loop will go through each character
var newTextLayer = thisDocument.artLayers.add(); // create new photoshop layer
newTextLayer.kind = LayerKind.TEXT; // set the layer kind to be text
// newTextLayer.name = textInLayer.charAt(a);
var theTextBox = newTextLayer.textItem; // edit the text
theTextBox.font = "Arial"; // set font
theTextBox.contents = theTextToSplit.charAt(a); // Put each character in the text
theTextBox.size = fontSize; // set font size
var textPosition = a*(fontSize*0.7);
theTextBox.position = Array(textPosition, textBaseline); // apply the bottom-left corner position for each character
theTextBox.color = textColor;
};
/* Reset */
app.preferences.rulerUnits = strtRulerUnits;
app.preferences.typeUnits = strtTypeUnits;
docRef = null;
textColor = null;
newTextLayer = null;
然后请移动有关屁股的文字图层
非常感谢亚当·埃尔索达尼(Adam Elsodaney)编写的脚本,这太神奇了-但是,如果您像我一样,并且希望脚本将单词而不是字符分开,则必须对其进行修改。
这是分解单词的相同脚本:
// enable double clicking from the Macintosh Finder or the Windows Explorer
#target photoshop
// in case we double clicked the file
app.bringToFront();
// debug level: 0-2 (0:disable, 1:break on error, 2:break at beginning)
// $.level = 0;
// debugger; // launch debugger on next line
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.POINTS;
var thisDocument = app.activeDocument;
// USE THIS LINE TO GRAB TEXT FROM EXISTING LAYER
var theOriginalTextLayer = thisDocument.activeLayer;
var theTextToSplit = theOriginalTextLayer.textItem.contents;
// OR USE THIS LINE TO DEFINE YOUR OWN
// var theTextToSplit = "Hello";
// suppress all dialogs
app.displayDialogs = DialogModes.NO;
// the color of the text as a numerical rgb value
var textColor = new SolidColor;
textColor.rgb.red = 0;
textColor.rgb.green = 0;
textColor.rgb.blue = 0;
var fontSize = 120; // font size in points
var textBaseline = 480; // the vertical distance in pixels between the top-left corner of the document and the bottom-left corner of the text-box
var words = theTextToSplit.split(" ");
for(a=0; a < words.length; a++){
// this loop will go through each character
var newTextLayer = thisDocument.artLayers.add(); // create new photoshop layer
newTextLayer.kind = LayerKind.TEXT; // set the layer kind to be text
var theTextBox = newTextLayer.textItem; // edit the text
theTextBox.font = "Arial"; // set font
theTextBox.contents = words[a]; // Put each character in the text
theTextBox.size = fontSize; // set font size
var textPosition = a*(fontSize*0.7);
theTextBox.position = Array(textPosition, textBaseline); // apply the bottom-left corner position for each character
theTextBox.color = textColor;
};
/* Reset */
app.preferences.rulerUnits = strtRulerUnits;
app.preferences.typeUnits = strtTypeUnits;
docRef = null;
textColor = null;
newTextLayer = null;
只是为了澄清(我不知道,不得不谷歌搜索)
.jsx
)textlayer
并且该文件已在Photoshop中打开。编辑:对于某些共振,双击并不总是有效,如果不起作用,则在photoshp中,转到“文件”>“脚本”>“浏览”,然后双击其中的文件。它会开始运行。
var theOriginalTextLayer = thisDocument.artLayers.getByName("textlayer");
为var theOriginalTextLayer = thisDocument.activeLayer;
脚本,则该脚本将在选定的文本层上工作:无需将其重命名为textlayer