Reply To: Creating a broadside – How to make line widths equal, with multiple text sizes?

Home Page / Forums / General InDesign Topics (CLOSED) / Creating a broadside – How to make line widths equal, with multiple text sizes? / Reply To: Creating a broadside – How to make line widths equal, with multiple text sizes?

#63450

You might want to familiarize yourself with the default “1 point larger / 1 point smaller” hotkeys: Ctrl+Shift+<, Ctrl+Shift+> — “Cmd” instead of “Ctrl” on the Mac.

Also note that your example does not have all of its lines fully filled (and is this a historical example? it contains a typo: 'Achinng')

But to get you started :) here is a little Javascript, cobbled together in a few minutes. Select a text frame and run the script to make each paragraph fit on a single line. It works on each paragraph, separated by hard returns. It depends on the number of lines inside a paragraph, so it does not work at all with forced line breaks (Shift+Enter): no matter how small the type gets, the text would never 'fit' on a single line!

if (app.selection[0] instanceof TextFrame)
{
par = app.selection[0].paragraphs;
for (i=par.length-1; i>=0; i-=1)
{
fit_unto_line (par[i]);
}
}

function fit_unto_line (a_par)
{
if (a_par.contents[0] == 'r' || a_par.contents.indexOf('n') >= 0)
return;

var halve = a_par.characters[0].pointSize/2;

while (halve > 0.05)
{
while (a_par.lines.length == 1)
a_par.pointSize += halve;
halve /= 2;
while (a_par.lines.length > 1)
a_par.pointSize -= halve;
halve /= 2;
}
}

This article was last modified on October 25, 2012

Comments (0)

Loading comments...