February 19 2008 • 6:48 PM

How to apply kerning as a character style

It’s always frustrated me that kerning doesn’t show up in the character style dialog box as a field that I can enter a specific amount.

I often want to apply kerning to a specific glyph as part of a character style which could then be part of a Find/Change routine.

But how can you make a character style that contains a specific kerning amount?

Turns out, you can trick InDesign into doing something it doesn’t want you to do. (Or maybe it does want you to do it, but it wants you to work hard to do it.)

First, place your insertion point between two characters and kern the amount you want.

Then select those two characters and click to define a new character style.

Look at the summary of the character style definition. The character style lists the kerning amount as part of the character style definition, even though you can’t actually set that kerning amount in the basic character formatting!

From that point on, it’s pretty simple to use the character style whenever you want to apply kerning.

5 Responses discussing this post. Add yours below.

  1. Dave Saunders
    February 19th, 2008 • 7:11 pm

    You’re promoting a bug, Sandee, which means that when Adobe gets around to fixing it your trick will break — on the other hand, they haven’t gotten around to it for quite a few releases, so I guess it’s pretty safe.

    Why can’t you use tracking to achieve (almost) the same ends? Granted, not using tracking opens the door to later applying tracking as a local override.

    Tracking is supposed to be applied to a run of text, but if you define tracking as part of a character style and then apply that character style to a single character, the insertion point after the character is, in effect, kerned by the amount of tracking called for.

    Dave

  2. David Blatner
    February 19th, 2008 • 7:21 pm

    I’m not convinced this is a bug, Dave. Why do you think so? The character style Summary is clearly set up to capture and record the formatting. For example, it says: “[None] + pair kern: -40″. Seems very non-buggy to me.

    I think it’s cool. Yes, tracking would give you a similar effect. But sometimes knowing how to trick InDesign is key to getting the job done!

  3. Dave Saunders
    February 19th, 2008 • 7:55 pm

    There’s a bug there somewhere. You can’t have a feature of an entity that is ignored by the dialog box that defines the entity.

    I first discovered this back in CS days (I think) when I was first working on my Text Style Reporting script. I recall reporting it and getting an acknowledgment back that this was indeed buggy behavior.

    The thing is that kerning applied this way overrides the kerning either built-into the font or calculated by the Optical algorithm while tracking is incremental. If you limit yourself to using such a style only for certain characters, then I suppose it doesn’t matter.

    Dave

  4. Dave Saunders
    February 19th, 2008 • 7:58 pm

    By the way, you can do the same thing with a paragarph style. Apply manual kerning to a pair of characters and with your insertion point still between the two character, redefine the paragraph style.

    Now I think about it, it’s not entirely true that the dialog ignores the setting (it does of course include it in the summary). You can reset it along with all the other settings by using Reset to Base.

    Dave

  5. Sandee “vectorbabe” Cohen
    February 19th, 2008 • 9:44 pm

    Dave,

    I don’t think the behavior is a bug. It is, as so many engineers will say, simply an “undocumented, and non-supported feature.”

    However, I know that as a scripter you are very sensitive to those areas where InDesign does something that may or may not be supported in a script. As you mentioned in the ID User forum, inserting a snippet as an inline object could cause a crash when part of a script, although it doesn’t do so when part of an ordinary File > Place action.

    I often think of your scripts as the canaries in the cave for bugs in InDesign. If something is in the least bit buggy, trying to do it in a script will cause a crash in InDesign.

    However, often times the same behavior is OK for us normal folks using the program manually.

    Meanwhile, regarding using tracking instead of kerning, I originally felt that using tracking, instead of kerning, wouldn’t work if you also wanted a tracking amount as part of the paragraph style. (Anne-Marie mentioned this to me in a private e-mail.)

    However, after some testing, I am starting to think that tracking is just fine.

    So, despite the trick being very clever, I think it may not be as necessary as I originally thought.

Subscribe to the Discussion

Get the ongoing discussion surrounding "How to apply kerning as a character style" delivered to you. Click here to subscribe via RSS.

Leave a Reply

You can use limited HTML tags, such as <em></em> for emphasis/italics and <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

InDesignSecrets reserves the right to edit and/or remove posts and comments.