How do I break apart text in Photoshop?

I have a word in a text layer in photoshop. I want each character to be on a separate layer, how can I do that?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

This can be done with scripting capabilities.

EDIT: I’ve update my answer below having tried and tested.

  • Open any text editor
  • Copy and paste the following code into it
  • Make sure whatever the name of the text layer is matches with what’s defined in line 20
  • Save as splitText.jsx
  • Open with Photoshop. Also make sure the document you want to apply this to is the currently active document.

Contents of 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;

Then move the text layers about ass you please

Method 2

  1. Select the Type tool.
  2. Type your letter.
  3. Duplicate the layer.
  4. Select the new layer.
  5. Highlight the copied letter and type
    the second letter.
  6. Repeat as needed.

Unless you’re breaking up “antidisestablishmentarianism,” this is the faster way to go.

Method 3

Thank you so much Adam Elsodaney for your script, It’s amazing – However if you’re like me and wanted the script to tear apart words and not characters you’ll have to modify it.

Here is the same script to break apart words:

// 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;

And just to clarify (As I didn’t know, had to google it)
  1. Save this to a text file (I.e. to your desktop with the extension .jsx)
  2. Make sure there is text layer in your photoshop named textlayer and that that file is open in photoshop.
  3. Double click the file.
  4. Profit.

Edit: For some reson double clicking doesnt always work, and if it doesnt, In photoshp go to File > Scripts > Browse and double click the file in there. It’ll start to run.

Method 4

I’ll just give my penny. You didn’t specified whether you need your new layers as editable text or just rasterized layers, in the latter case you can:

  1. Rasterize your layer
  2. Make a selection around your first layer
  3. Hit CTRL + SHIFT + J (Or CMD + SHIFT + J) to cut the selection to a new layer
  4. Repeat step 2 and 3 for each letter

Again, do this only if you’re ok with having rasterized layers. If you need text layers go with Lauren Ipsum answer as it is probably the faster way.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x