Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Automatic Text Adjustment within a fixed Text box

New Here ,
Jan 11, 2008 Jan 11, 2008
As I am using Datasets and Variables with an XML file generated by a Database software. I am looking for a way to get the text size automatically adjusted within a text box (the design allow us to use a specific size for the text box, which is maximize, but sometime the text value is just too long for standard text size).

This could prevent the text from being trunk and maximize the space available within the text box whenever it's possible. Also, as I have more than a thousand datasets, manual QA and adjustment are not possible.

I'm using Windows with Illustrator CS.

Any clues? Could save my life :)!!!
TOPICS
Scripting
942
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
New Here ,
Jun 21, 2008 Jun 21, 2008
I could use help with something a little similar. Hope you get an answer on this.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 22, 2008 Jun 22, 2008
Not sure I am interpreting the question correctly, but it sounds like you are talking about needing to auto-fit the height of an AreaType object to its text content, so as to accommodate different lengths of text that are imported into the bound textFrame variable.

Unlike better text handling in other programs, Illustrator textFrame objects do not provide a vertical auto-fit capability to avoid overset text.

There have been several attempts to script a workaround for the long-needed auto-fit capability. Mine is referenced in this thread.

The alternative would be to use a PointType object as the bound textFrame, and include carriage returns in your dataset values.

JET
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 26, 2008 Jun 26, 2008
Txs for the solution. However, I do not want the size of the text box to be adjusted but the font size adjusted to the space available within the text box. For the specific design, the size of the text box is already maximize.

Any solution at this level?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 26, 2008 Jun 26, 2008
LATEST
Either of two solutions should work. Both would be quite similar to the script I mentioned:

Either...

Incrementally increase/decrease the textRange character size in a for loop, checking the count of visible lines/characters on each iteration

or...

Incrementally scale (proportionally) the textFrame in a for loop, checking the count of visible lines/characters on each iteration. Then scale the whole object so as to match the original dimensions.

JET
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines