Skip to main content
Participant
March 25, 2024
Question

Is there any way to stretch shapes to accomodate text boxes?

  • March 25, 2024
  • 4 replies
  • 488 views

Hello all!

I'm working to create 1000+ subtitles through Photoshop, which requires me to

1. copy/paste lines into a text box, and

2. stretch the background shape to fit the subtitles.

(The subtitle template I use has a black square shape at the back of the text for better legibillity)

 

Now, I've automated the first part through the text variable feature.

 

However, I still have to manually stretch all the background shapes to fit the size of the text box.

Is there any way I could also automate this process? It would save me hours of tedious work if this can be automated.

My company has all scripting languages like Java blocked (for security reasons they say) so I'm unable to do any scripting. 😞

 

Thank you very much in advance! And sorry if sloppy English, I'm not a native user.

This topic has been closed for replies.

4 replies

Trevor.Dennis
Community Expert
Community Expert
March 25, 2024

How about using an Outer Glow or Stroke instead of a shape layer behind the text.  

 

The four lines below are, in order, none (plain white), 1 pixel stroke, outer glow, more traditional lower third with black background at 20% opacity.

 

 

Does it have to be done in Photoshop?  There must be apps that will automatically size the background.

 

Stephen Marsh
Community Expert
Community Expert
March 25, 2024

@Trevor.Dennis 

 

Good suggestion, the only drawback is that corners may be rounded with some settings (not in your example though)... But there is a workaround.

c.pfaffenbichler
Community Expert
Community Expert
March 25, 2024
quote

My company has all scripting languages like Java blocked (for security reasons they say) so I'm unable to do any scripting. 😞

Just to make sure: Do the Scripts under File > Scripts > … work? 

Stephen Marsh
Community Expert
Community Expert
March 25, 2024
quote
quote

My company has all scripting languages like Java blocked (for security reasons they say) so I'm unable to do any scripting. 😞

Just to make sure: Do the Scripts under File > Scripts > … work? 


By @c.pfaffenbichler


Exactly, Photoshop has many scripts installed by default, many of which may not even be understood to be scripts by end users, such as Export Layers to Files.

 

@유승은 - P.S. Java isn't scripting, JavaScript isn't the same thing as Java.

 

I understand where your I.T. Department is coming from, however it limits your options for automation. Even if scripts work from within Photoshop, employees may be within breach of contract or policy by using third party scripts, whether they are benign or not.

Stephen Marsh
Community Expert
Community Expert
March 25, 2024

My first thought was to do this in Illustrator with the appearance panel... But that would need testing.

 

For Photoshop, create a smart object from the text layer. Edit the SO and use a relative canvas extension and add a black fill layer behind the text layer. Save and close the SO. Reveal all or trim steps might be required. This can be recorded into an action and used with the automate batch command.

 

P.S. Please post before and after examples and or a sample layered PSD file.

Bojan Živković11378569
Community Expert
Community Expert
March 25, 2024

Utilize data-driven graphics, also known as variables. Apply the Pixel Replacement variable with the Method option set to 'Conform'.