Copy link to clipboard
Copied
Hello guys, is there a way to get text to automatically resize so that the entire contents fit within a box of a specified length and width? Currently I'm having to manually resize the text in several boxes to get it to fit within the correct dimensions that I want. I am doing this on a daily basis, numerous times a day so need a more efficient process for getting this work done! This would speed things up for me enormously!
I've attached a pic that hopefully demonstrates what I mean:
Thanks very much for reading!
Copy link to clipboard
Copied
From the attached pic, it's unclear what the problem is, since I don't see any overset text symbol?
Copy link to clipboard
Copied
Hi, basically I want text to fit within a box, and as I type into that box if the text needs to rescale in order to do that, then that's what I need it to do. Is there a script or something for this?
Copy link to clipboard
Copied
Do you need the text to remain live, or can you expand it?
In my experience, accurately sizing live text is very very difficult, especially if you're dealing with differences in ligatures. For some reason, Illustrator doesn't accurately measure the height/width of live text, and the discrepancy differs between different fonts (see screenshot: the gray boxes indicate the bounding box of each different font. each of these fonts are the same point size, but the bounding boxes are very different).

Copy link to clipboard
Copied
Hi there, sorry for the late response. I need the text to remain live so it's editable. Sorry I wasn't clear - the text needs to fit within a box of a fixed width and height - say 4CM x 0.5CM, so I need the size of the text to change dynamically without myself having to play around with it and get it to fit.
Copy link to clipboard
Copied
let me see what i can do.
Copy link to clipboard
Copied
I am excited to see what you can come up with, and see if what I've got can measure up ![]()
Copy link to clipboard
Copied
If you've got something that works, by all means post it up. perhaps it will inform my testing.
Copy link to clipboard
Copied
It will take a little while, when I get a moment in the evening time, if so.
Copy link to clipboard
Copied
Wow guys, this thread got hot fast - you guys don't have to make a script or whatever just because I'm looking for one, but damn guys, it's massively appreciated!
Copy link to clipboard
Copied
I should probably have just said this from the start - here's what I need them for - View image: tgh
They are Playstation light bar stickers which get placed over the light bar of a Playstation controller and create a cool effect by only allowing the light from the light bar through the text sections. I can make up to 40 of these a day, and with them being custom orders it can be quite time consuming to manually have to resize everything perfectly to fit within the borders (they can't be all the way up to the corners as the sticker is slightly larger than the light bar.
Sorry I wasn't clearer in the first place!
Copy link to clipboard
Copied
Is the sticker always the same size? I was imagining something different originally. I think you might be well suited to use an action for what you're trying to do here.
You can simply set an action to make a call to the transform panel and resize it to the desired width. (you may need to also apply an 'outline object' effect in order to properly resize the text). I've been using an action like this for years.
I think this would work better for your situation here, AND you'll be able to set a hotkey to the action as well.
Copy link to clipboard
Copied
Thanks William, I'm fairly new to illustrator as I was previously using more basic software for this sort of thing, but I love how powerful it is, just don't know my way around completely yet! I actually had no idea about that being possible solely from an action, so I'll definitely check that out, thanks!
How will it play with the fact the shape is not a rectangle? I'd like the text to be as big as possible when there are only a few characters, but when there are several for them not to go over the edge. If I make the text box for the text as deep as possible I'm thinking that while for a few characters it will work beautifully, when there are many the text will spill over the bottom edges of the sticker as the text box has to be a rectangle. Does that make sense? Bit tired (been up 24 hours and about to go to bed!).
Copy link to clipboard
Copied
if you have any questions about how to set that up, i'd be glad to help. You should easily be able to find some basic action tutorials, but if you get to something that stumps you, let me know. 😃
Copy link to clipboard
Copied
Thanks again, I'll look into it tomorrow, I'm about to crash!
Copy link to clipboard
Copied
can you post screen shots of how it should look when your text is a few characters only?
I was scratching my head all day trying to remember the thread where someone asked a similar question, I finally found it, have a look at this great method, it involves Envelopes, no scripting needed.
Copy link to clipboard
Copied
oohhh yeaa! i forgot all about envelopes. great suggestion, Carlos!
Copy link to clipboard
Copied
Hey fellas, sorry for the delay in reply. Here's an image that hopefully shows what I'm trying to accomplish - this isn't illustrator, it's my cutting program which I currently use to do all this, but illustrator works perfectly for it too. Note how the text in the upper right box is smaller than the other text. The text basically needs to fit to whichever corner of the red area I drew on it hits first!
Copy link to clipboard
Copied
That is really handy, so thanks for that - HOWEVER! - I need the text to maintain its proportions and it seems this method distorts the text in order to fill a selected area - I just need the text to stay in the same proportions, but whenever it hits one of the edges of my stickers to start scaling down as more text is typed in.
Copy link to clipboard
Copied
That's why we're here. We like to help. This particular task just happens to be something that I'm interested in as well. I'm a few months out on finishing a big project i've been working on, but it relies on my ability to resize text accurately and dynamically, even if there are very complex graphic styles with many strokes and patterns involved..
So trying to figure this out for you helps me too. So it's not completely altruistic. =P
Copy link to clipboard
Copied
are you guys working on a "resize as you type" script as requested? wow, it would be great but wouldn't it be enough to just resize typed selected textFrames?
Copy link to clipboard
Copied
oh.. i was just trying to resize textFrames. i wouldn't even know where to begin resizing as you type.
Copy link to clipboard
Copied
Yea, we're taking "resize as you type" figuratively and taking it to mean "doing the entirety of the task which involves typing , stopping , scratching chin and squinting, etc - only then resizing" . haha.
Copy link to clipboard
Copied
OP are you looking for something that will resize the entire text frame each time you type a letter? for example you type one letter and it fills the whole space, then you type a second letter and both letters automatically resize to fit, then when you type a third letter etc etc?
Or are you asking for a way to select a textFrame and run a script that resizes it to the specified size?
Copy link to clipboard
Copied
I know this thread is about 8 years old at this point - but I'm currently trying to figure out if there is a way to do the former in illustrator.
"something that will resize the entire text frame each time you type a letter? for example you type one letter and it fills the whole space, then you type a second letter and both letters automatically resize to fit, then when you type a third letter etc etc"
If this is possible, or if any of you have guidance (and are still active after 8 years) I would love some insight 🙂
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more