Skip to main content
New Participant
July 29, 2021
Question

automatically fit text to a box in illustrator

  • July 29, 2021
  • 3 replies
  • 2349 views

Hello.

I have a question.

If i have a fixed box size in one of my designs can i somehow make different length of text fit automatically into that box?

I know how to resize the box to fit the text but im after the opposite. So far i have'nt seen any information about it. 

 

Best regards

Bepees

This topic has been closed for replies.

3 replies

BepeesAuthor
New Participant
July 30, 2021

So this is what i wish to achieve. (see attached picture)

I want to be able to copy past names into a box and that the names  are automatically adjusted to fit the box.

 

Best regards.

Bepees

 

Scott Falkner
Community Expert
July 30, 2021

If this is for a visual appearance you can do this in the Appearance panel. THis works best for point text. That is, text made by clicking with the text tool so the text has no margins.

 

In the Appearance panel add a Fill and drag it below the Characters line in the Appearance panel. With that fill selected go to Effect > Convert to Shape > Rectangle. Turn on preview and adjusttherelative size of the rectangle to get he size you want. Click OK. If you want a stroke then add a Stroke in the Appearance panel. Hold Option or Alt and drag the Rectangle effect into the Stroke line. This will duplicate the effect.

 

You now have a live text object with a fill and stroke that will scale to the size of the text. You can make this a Graphic Effect and apply it with a click to any text. As an effect is can be edited to make global changes.

BepeesAuthor
New Participant
July 30, 2021

Thanks for the answer,

The thought behind it all is to cut time making the designfiles for our engravery machines by just copy pasting the names then save the file. Then insert it into our machines. Not sure if the graphical effect would work. But the rest should be easy to fix with a macro,

 

Best regards

Bepees

Kurt Gold
Community Expert
July 29, 2021

Can you please show a sketch that may explain exactly what kind of result you are looking for?

 

Also, which version of Illustrator are you using?

 

Mike_Gondek10189183
Community Expert
July 29, 2021

@Silly-V  whom I belive is Vasily Hall might be able to help as that is his expertise.

The script on this page or the git hub newer version do not work in the latest Ilustratot for me.