I have a textframe with a large heading and some small text. Between the edge of the textframe and the first letter of each line is a small gap. That gap gets wider the larger the font size gets. I use a white space before the first line of the heading and then [ALT] + [<] to even out that space, but that doesn't get it perfectly aligned. When I needed it to fit perfectly I used two different Textframes and aligned these in the past, which doesn't seem to be the right way to do it.

Is there some way to get that gap even between large and small font sizes in the same textframe ?

enter image description here

2 Answers 2


The method you describe is basically the simplest way to align a header horizontally to the body text so I won't propose a different method, but I have some tips and tricks.

Enter the kerning value manually

What happens when you press Alt + is that you decrease the Kerning between the characters on the left and right side of the text cursor.

Kerning is measured in 1/1000 em. 1 em equals the chosen font size so it's a relative unit. It's only possible to use integer values so no decimals.

The keyboard increment is set in Preferences > Units & Increments > Keyboard Increments > Kerning/Tracking and the default value is 20.

To get more precision you can change that value to 1, but I find it simpler to use the arrows until I find the best possible match and then manually enter a more precise value by trial and error.

Use an Indent to Here character instead of white space

Using a white space as the first character is fine, but I prefer to use a character which has no width so I can adjust the header from its initial position. The Indent to Here character works well because it has no real use in the beginning of a paragraph anyway.

Use guides

It's not possible to move entire paragraphs left - only the first line, so it's easiest to just accept the tiny gap there is to the left of the smaller body text and adjust the headers accordingly.

This is easily done by using a guide. Zoom all the way in on the body text, drag a guide that aligns with the left side of the body text and adjust the header to align with the guide.

Calculate the offset precisely

It is possible to calculate the needed offset precisely, but it's not really worth the effort because the kerning value can't have decimals anyway so it's pretty easy to find the closest match manually.

Anyway, the method would be:

  1. Since you probably measure your font sizes in points temporarily change Preferences > Units & Increments > Ruler Units > Horizontal to points.
  2. Position a text frame with an "L" in the header paragraph style and an "L" in the body paragraph style so it snaps with the left edge of the page.
  3. Select the text frame and use Type > Create Outlines to convert the text to vector shapes.
  4. Use the Gap Tool to measure the offset of the header "L" (shown in cyan) and the body "L" (shown in magenta).

  1. Now the kerning can be calculated like this: 1000 * (headerOffset - bodyOffset) / headerFontSize (if you use the Indent to Here character which has no width)

Apply the offset to the Paragraph Style

Once you have found the correct kerning to use it can off course be reused on all headers. This can be semi-automated in the paragraph style of your header by using GREP Styles to apply a character style to the first character.

There are few problems. Kerning can't be saved in a character style since it's applied between characters, so we need to use Tracking instead. But tracking doesn't work on the Indent to Here character so in this case we have to use a white space.

Here is a quick outline of the method. There are some quirks I won't go into details with here (feel free to ask for clarification in comments).

  1. Insert some white space character in the beginning of the header which you don't use elsewhere, for example a Thin Space.
  2. Select the Thin Space and apply negative Tracking until the header is correctly aligned.
  3. Copy the Thin Space to clipboard.
  4. With the Thin Space still selected create a new Character Style.
  5. Enter the Paragraph Style of the header and create a new GREP Style.
  6. Set Apply Style to the character style you just created.
  7. Paste the Thin Space into the To Text field.

Now whenever you insert a Thin Space in the beginning of a header, it should automatically move into place.

Using Optical Margin Alignment

InDesign does offer a way to optically align margins, but I don't personally like it much (or know much about how to use it).

If you select a text frame (or place the text cursor somewhere in a story) and turn on "Story > Optical Margin Alignment" InDesign attempts to optically align the margins regardless of font size for that particular story.

In my experience it seems to work best if you set Align based on size (the only available setting) to the same as the largest font size used.

The different font sizes becomes aligned, but they move even further to the right leaving a gap in the left side of the text frame. Furthermore the hyphens are allowed to extend outside the text frame in the right side.

This setting applies to the story and can't be a part of a paragraph or object style.

  • Very helpful and detailed, thanks for that!
    – Lapskaus
    Aug 14, 2020 at 7:12
  • I guess there is no way to have that set up to automatically apply, for example with paragraph formatting ?
    – Lapskaus
    Aug 14, 2020 at 14:06
  • Not that I'm aware of (and I've tried tons of things). Sadly you can't have negative Left Indent. There is one thing though. Using Story > Optical Margin Alignment on the text frame with Align based on size set to the font size of the largest header. But there are some downsides to it. I think I'll add this to the answer (even though I've already gone overboard explaining 😀).
    – Wolff
    Aug 14, 2020 at 16:03
  • Updated the answer.
    – Wolff
    Aug 14, 2020 at 16:37
  • 1
    Minor detail: the optical alignment setting applies to the story, rather than the text frame – that is, if you turn it on, it applies to all text frames in the story, not just the currently selected one. Aug 14, 2020 at 20:47

I'm just guessing that the font designer created a big left sidebearing on the L, desto growing as the point size gets larger. Have you noticed if this does only happen with that font? If yes, that could be an issue regarding the font and not the software...

  • I just tested a couple dozen and it seems to be an issue with ~50% of the fonts. Even if it is a font issue. The question remains if it is fixable/adjustable by InDesign
    – Lapskaus
    Aug 13, 2020 at 15:17
  • Have you tried placing the cursor before the L and clicking on the left keyboard arrow while you keep Alt depressed?
    – Mosh
    Aug 13, 2020 at 15:34
  • Or have you tried exploring your paragraph style in order to check that there are no accidental first-line indents or tabs?
    – Mosh
    Aug 13, 2020 at 15:35
  • Well as I mnetioned in the question, I did. the results are not perfectly aligned though. And no, every stye has a 0mm distance from left.
    – Lapskaus
    Aug 13, 2020 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.