Skip to main content
Waterbear
Participating Frequently
June 13, 2014
Question

Fit frame to content but in Photoshop

  • June 13, 2014
  • 3 replies
  • 4547 views

I feel as if someone out there must have asked for this already but a search didn't find it, so I'm asking. Sorry if it's been done before.

In Indesign, you can select "Fit frame to Content" and the text box will shrink to the size of the text. Has anyone written a script to do that in Photoshop?

(Please don't say something like, "Photoshop is for images, use Indesign for text and layout. Yes, I get that, but that's not the question I was asking.)

Thanks!

This topic has been closed for replies.

3 replies

Waterbear
WaterbearAuthor
Participating Frequently
June 16, 2014

I get PSD files from other people from time to time at work. A few of the other designers think you need a text box that's many hundreds of pixels long and tall to type one word, and other such scenarios. Its a pain to edit these files because I end up grabbing the giant text box instead of something else that's under it.

I would love a way to select the text layers and run something that makes the text boxes fit the words inside them.

c.pfaffenbichler
Community Expert
Community Expert
June 17, 2014

If it is about one-word-Type Layers might converting the Paragraph Text to Point Text not suffice?

Waterbear
WaterbearAuthor
Participating Frequently
June 19, 2014

You know, of all the people I discussed this with, no one has ever mentioned trying this out. I did and it works pretty well for me. Thanks!

c.pfaffenbichler
Community Expert
Community Expert
June 15, 2014

Which purpose is this intended to serve?

matias.kiviniemi
Legend
June 14, 2014

In theory you could set artLayer.TextItem.widht/height to the values of the bounding box (have not tried, but docs say it's read-write). However the width and height are a bit challenging because they ignore transforms, i.e. if the text box has been resized. You'd have to fetch scale factors using action descriptors and calculate unscaled size and set that. See below discussion for details

https://forums.adobe.com/thread/1110456