Skip to main content
Participant
September 14, 2017
Answered

Resize font to fit exactly to an area

  • September 14, 2017
  • 1 reply
  • 1187 views

Hi,

We are producing artwork which will fill a number with a list of names. Currently we have to paste the names into the link text areas and then play with the line height and font size in order to make it fit perfectly.

Is there any way to resize the font to automatically fit the area eaxctly (no gap at the bottom and no free space)?

Note - we are using COM automation to populate the designs.

    This topic has been closed for replies.
    Correct answer Mylenium

    Unless you expand the text no. That's the old gag of the font's em box vs the actual contours. If you're really doing this a lot and always use the same fonts, though, by now you should have figured it out and hardwired the sizes into some paragraph styles or created scripts for your workflow.

    Mylenium

    1 reply

    Mylenium
    MyleniumCorrect answer
    Legend
    September 14, 2017

    Unless you expand the text no. That's the old gag of the font's em box vs the actual contours. If you're really doing this a lot and always use the same fonts, though, by now you should have figured it out and hardwired the sizes into some paragraph styles or created scripts for your workflow.

    Mylenium

    Participant
    September 14, 2017

    Hi,

    Thanks for the response. We have little Illustrator experience - we are software developers here.

    We have been looking into the scripting method but cannot find out how to check if the text has overflowed. In InDesign there is a property called "overflows"  on a text area that would allow you to loop through re-rendering the text until it overflowed and then reduce it a bit. This functionality does not appear to be present on Illustrator.

    I'm not sure where to look for help on this now!

    Thanks.

    Monika Gause
    Community Expert
    Community Expert
    September 14, 2017

    This script can correct rectangular text boxes:

    Script: Fit Text Frame to Content (Depth) « Kelso’s Corner

    Maybe the code gives you a clue.

    Also there's a plugin that can detect text overflows: Text Overflow Alert for Adobe Illustrator - Macintosh

    So if scripting does not get you there, you might need to write your own plugin.