¿Cómo separo el texto en Photoshop?

Tengo una palabra en una capa de texto en Photoshop. Quiero que cada personaje esté en una capa separada, ¿cómo puedo hacer eso?

Tengo el mismo problema, pero es para una capa de texto de oración que necesito dividir en palabras. Necesito un atajo porque hay demasiadas capas de texto para separarlas. y tomará tiempo hacerlo uno por uno.

Respuestas (4)

Esto se puede hacer con capacidades de secuencias de comandos.

EDITAR : actualicé mi respuesta a continuación después de haber probado y probado.

  • Abre cualquier editor de texto
  • Copie y pegue el siguiente código en él
  • Asegúrese de que el nombre de la capa de texto coincida con lo definido en la línea 20
  • Guardar como splitText.jsx
  • Abrir con Photoshop. También asegúrese de que el documento al que desea aplicar esto sea el documento actualmente activo.

Contenido de 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;

Luego mueve las capas de texto sobre el culo que quieras

PD. La respuesta de Lauren Ipsum es mejor/más fácil: D
Estaba buscando cómo hacer esto. Felicitaciones por armar este guión. Lo probaré cuando esté cerca de una computadora y te responderé. +1!
@Adán: gracias. Te estoy dando +1 solo por pasar por todo ese esfuerzo de secuencias de comandos. :)
No sabía que Photoshop podía programarse usando javascript
@Moshe @Lauren Ipsum gracias, voy a ver si puedo desarrollar esto más, luego publicaré un tutorial en línea
@horatio: jajaja yo tampoco hasta hace unas semanas. Realmente puede aumentar su creatividad para aquellas cosas que tomaría horas hacer manualmente
  1. Seleccione la herramienta Texto.
  2. Escriba su carta.
  3. Duplica la capa.
  4. Seleccione la nueva capa.
  5. Resalte la letra copiada y escriba la segunda letra.
  6. Repita según sea necesario.

A menos que esté acabando con el "antidesestablecimiento", este es el camino más rápido a seguir.

Muchas gracias, Adam Elsodaney, por tu guión. Es increíble. Sin embargo, si eres como yo y querías que el guión rompiera las palabras y no los personajes, tendrás que modificarlo.

Aquí está el mismo script para separar palabras:

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

Y solo para aclarar (Como no sabía, tuve que googlearlo)

  1. Guarde esto en un archivo de texto (es decir, en su escritorio con la extensión .jsx)
  2. Asegúrese de que haya una capa de texto en su Photoshop nombrada textlayery que ese archivo esté abierto en Photoshop.
  3. Haga doble clic en el archivo.
  4. Lucro.

Editar: para algunas resonancias, hacer doble clic no siempre funciona, y si no es así, en Photoshop, vaya a Archivo> Scripts> Examinar y haga doble clic en el archivo allí. Empezará a funcionar.

FYI, si cambia var theOriginalTextLayer = thisDocument.artLayers.getByName("textlayer");a var theOriginalTextLayer = thisDocument.activeLayer;la secuencia de comandos, funcionará en una capa de texto seleccionada: no es necesario cambiarle el nombre atextlayer

Solo daré mi centavo. No especificó si necesita sus nuevas capas como texto editable o simplemente capas rasterizadas, en el último caso puede:

  1. Rasteriza tu capa
  2. Haz una selección alrededor de tu primera capa
  3. Presione CTRL + SHIFT + J (o CMD + SHIFT + J) para cortar la selección a una nueva capa
  4. Repita los pasos 2 y 3 para cada letra

Nuevamente, haga esto solo si está de acuerdo con tener capas rasterizadas. Si necesita capas de texto, vaya con la respuesta de Lauren Ipsum, ya que probablemente sea la forma más rápida.