Skip to main content
Participating Frequently
October 7, 2020
Answered

Using Dynamic Text Variables - Need text to resize automatically

  • October 7, 2020
  • 2 replies
  • 6902 views

The latest version of Illustrator.

I am using batch actions to create many graphics versions with dynamic text and I am using an XML file to input the dynamic text variables. Some of the text is too long and goes beyond the artboard. I am trying to figure out a way to dynamically change the size of the text so that it will always fit within a defined width.

 

I haven't had any luck finding out if this is possible in Illustrator. 

 

Thank you in advance for your help!

Mike

This topic has been closed for replies.
Correct answer Silly-V

You can use this script of mine for shrinking the text, a very common problem.

https://github.com/Silly-V/Adobe-Illustrator/blob/master/Dataset%20Processing/DealWithOversetText_SingleLine.jsx

2 replies

Silly-V
Silly-VCorrect answer
Legend
October 7, 2020

You can use this script of mine for shrinking the text, a very common problem.

https://github.com/Silly-V/Adobe-Illustrator/blob/master/Dataset%20Processing/DealWithOversetText_SingleLine.jsx

Mike5FA5Author
Participating Frequently
October 7, 2020

Hi Silly-V,

I came across your scripts last night. The problem maybe I don't know how to use scripts properly in Illustrator. 

 

I copied your script into a new BBedit text document and saved it with the .JSX extension (see screenshot below).

 

 

I opened the existing artboard then I click File/Scripts/Other Scripts then navigate to the folder I saved DealWithOversetText_SingleLine.jsx. I then click on the area type text box and cycle through the variables. The characters don't resize and respond the same way they did before I loaded the script. I must not be doing something right.

 

 

 

Mike5FA5Author
Participating Frequently
October 7, 2020

I went back and quit Illustrator and copied the script into the scripts folder under /Applications/Adobe Illustrator 2020/Presets.localized/en_US/Scripts. I restarted Illustrator and loaded the script File/Scripts then clicked on DealWithOversetText_SingleLine.jsx. I created a new area type text box with the same results. I then changed the text box to point type with the same results. 

 

What am I doing wrong?

Monika Gause
Community Expert
Community Expert
October 7, 2020

Maybe you can detail the process a little further?

Also show the template document you use - are there point texts in it or area texts?

Mike5FA5Author
Participating Frequently
October 7, 2020

I've tried area and point text and neither resized the text to keep it within the area I defined. The screenshot below is a area type example of how the text adds rows when the text is to long to fit and uses the same text size. 

 

 

Point type example below and how the text reacts to lengths longer than will fit.

 

 

Mike5FA5Author
Participating Frequently
October 7, 2020

I found this request in the Illustrator feature requests. https://illustrator.uservoice.com/forums/333657-illustrator-feature-requests/suggestions/37449973-resize-text-to-fit-text-box

 

I've tried a couple of scripts I found that was supposed to do this but none of them produced any changes. If the option doesn't exist is there a script that will adjust the text size to that of the text box for longer text for variable input purposes