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

Equal line leading with different font sizes in each line

Explorer ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

Hi all,

I'm having trouble finding out a quick and easiest way to evenly distribute lines that contain text of different font sizes. I was trying with styles alone but failed. The closest I got is the example below where I set text frame auto-size in created object style, and distribute the chosen lines by Align function:

But even this doesn't give me the perfect result due to this "phantom" space above font in every text frame:

Any help appreciated!

Views

5.5K

Translate

Translate

Report

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
Guide ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

you could try yhis:

text frame options > baseline options and choose  Cap Height

Schermata 2017-03-30 alle 08.34.02.png

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

If each text is only a single line, it is simple, specify in the used paragraph styles (never work without!) space before and after and make them equal.

If the text is multiple line, the space between these lines is defined by the leading in character properties.

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

Hi Willi,

if we can deduce from the second screenshot of the OP all lines of text are in different text frames.
The distance from the bottom ( baseline ) to the top of the next line ( maybe the cap height? ) should be equal after redistributing the text frames.

I think, permio_oscar has it right.
For all text frames that have formatted text with capitals (uppercase letters).
And where the fitting options for vertical fitting are made.

If all the lines would be in one single text frame this would be a different matter.
Then no automatic or semi-automatic solution would be thinkable. That would require a scripting solution that would calculate distances and change the leading accordingly. Based on some factors we should discuss with the OP.

There is a different solution without using the distribution of text frames:

1. All text frames are stacked and aligned on top.

2. All text frames have a text wrap.

3. All text frames have an inset at the bottom that would dictate the distance from each other.

See this for stacking order and text wrap:

StackedFrames-Using-TextWrap-FittingOptions-BottomInset.png

EDIT: Forgot to mention

4. All text frames fitting options are set to top vertical alignment.

5. I used cap height as Oscar suggested.

Regards,
Uwe

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

I'm having trouble finding out a quick and easiest way to evenly distribute lines that contain text of different font sizes.

You don't have to cut the text into different frames to adjust the leading on individual lines of text. In Preferences uncheck Apply Leading to Entire Paragraphs:

Screen Shot 2017-03-30 at 7.56.01 AM.png

Now I can select line 2 (triple-click) and adjust its leading relative to line 1 without affecting the other lines.

Screen Shot 2017-03-30 at 7.54.55 AM.png

Votes

Translate

Translate

Report

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
Explorer ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

Hi again,

I found premio_oscar post the most useful. The cap height setting solved the uneven frames problem, and then vertical distributing does the job by equal frame spacing.

Although the former method seems more intuitive, Laubender method also works, only problem with this one is I don't get how the order of these lines gets settled when using this set up. When I move one line over the other and align to top, then they get rearranged differently. So I don't have control over the order.

@rob day, Hi, the point was to avoid setting up leading manually to each line one by one.

I guess there is no method that allows to do this fast in one frame.

Thank You all!

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

Hi,

for stacking order with my sample see the screenshot where the Layers panel is open.
It's from right to left if you see the not aligned row of text frames:
On top of the stack is the frame to the right, then down the stack follows the centered one, finally the left one.

Regards,
Uwe

Votes

Translate

Translate

Report

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
Explorer ,
Mar 30, 2017 Mar 30, 2017

Copy link to clipboard

Copied

Ah, get it now. Works

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 31, 2017 Mar 31, 2017

Copy link to clipboard

Copied

LATEST

Here's a JavaScript version:

var s=0;

main();

function main(){

  

    app.activeDocument.viewPreferences.horizontalMeasurementUnits=MeasurementUnits.POINTS;

    app.activeDocument.viewPreferences.verticalMeasurementUnits=MeasurementUnits.POINTS;

    app.activeDocument.textPreferences.useParagraphLeading=false;

  

    var ls=app.activeDocument.selection[0].lines;

  

    for (var i = 0; i < ls.length; i++){

        var a = ls.ascent;

        var b = ls.pointSize;

        ls.leading = a - (b / 10) + s;  

    }

}

Votes

Translate

Translate

Report

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
Community Expert ,
Mar 31, 2017 Mar 31, 2017

Copy link to clipboard

Copied

@rob day, Hi, the point was to avoid setting up leading manually to each line one by one.

I guess there is no method that allows to do this fast in one frame.

Generally I like to avoid cutting text up into frames, but you are right manually adjusting leading in this case would take some time.

It is possible to script running text by getting each line's ascent. So the AppleScript (OSX only) below does this to the selected text:

Screen Shot 2017-03-31 at 9.28.56 AM.png

Screen Shot 2017-03-31 at 9.29.04 AM.png

The s variable in the first line of the script adds space in points

Screen Shot 2017-03-31 at 9.29.42 AM.png

------------------------------------

set s to 2

tell application "Adobe InDesign CC 2014"

    set properties of view preferences of active document to {horizontal measurement units:points, vertical measurement units:points}

    set use paragraph leading of text preferences of active document to false

   

    set ls to object reference of every line of selection

    repeat with x in ls

        set a to ascent of x

        set b to point size of x

        set leading of x to a - (b / 10) + s

    end repeat

end tell

Votes

Translate

Translate

Report

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