Automating A3 in-store signs: how to fit variable-length names to a fixed frame without distorting type
We generate in-store A3 landscape signs automatically from our ERP: a JSON job feeds an ExtendScript that drives InDesign 2026 and exports the PDF, with no manual step. Each sign holds 2 or 3 uppercase lines (the product name) whose length varies a lot from product to product.
Design goal: the largest possible cap height (these are read from the street), the text block filling the sheet, and no distorted type.
What the script does today: it sets the point size from the height each line gets, then raises horizontalScale until the line reaches the frame width. That lands at 115-130%, which is visibly distorted, so this is clearly the wrong tool.
Questions:
1. Is there a scripting equivalent of Illustrator's Type > Fit Headline in InDesign, or is adjusting tracking the accepted way to make a short line fill the measure?
2. For a line that is too long, is switching to the condensed cut of the same family the recommended automated fallback, rather than reducing the point size?
3. Is Line.horizontalOffset / Line.endHorizontalOffset the reliable way to measure the rendered line width so size and tracking can be computed in a single pass instead of a shrink-until-it-fits loop? Anything to watch out for (justification, optical margin alignment, first baseline offset)?
4. For an automated pipeline like this, are variable fonts with a wdth axis the right long-term answer for width fitting?
5. Is there any built-in feature (auto-size text frames, object styles, paragraph style settings) we should be using instead of a custom fitting loop?
Thanks. Happy to share the script if it helps.
