Those who have used Illustrator prior to version CS know that it was once possible to use the Average command to align point text. Alas, those days are gone with the way the newer text engine works, and instead, one can use the Align palette (or the Align icons that appear in the Control Palette when multiple objects are selected) to align text objects. In some ways, the align options are far more powerful now because of this.
To illustrate, take this wonderful question that comes in from Greg Walker:
So, let’s say you’ve a line of text that you want to align horizontally to the center of a circle. If it has ascenders and descenders, then when you align the two they look great (nicely centered). However, if you’ve got something typed in all caps or small caps it starts to look funny because Illustrator (and InDesign for that matter) is still taking into account the space assigned for ascenders and descenders. Your alignment looks slightly off. You can convert the text to outlines and align it just fine, but is there a way to get around having to do that? You can kern optically, but can you align optically?
Greg is absolutely right here. When Illustrator aligns a text object to another shape, it's taking the height of the characters -- which includes ascenders and descenders -- and centering the objects based on that. If indeed, your text contains characters that touch these two extremes, your text will look as though it is centered with the other object, as illustrated below:
The problem arises when you don't have both ascenders and descenders in your type object. In the example shown below, I've changed all the characters to all caps. Now, when I try aligning the cricle and the text, it appears as if the text isn't aligned. It is, from a theoretical standpoint, but us designers don't get paid money to make graphics that is "theoretically correct" -- they need to be visually correct.
So how to get around this issue? I'll admit my first thought was to run to the Align palette, and from its palette menu, choose the "Use Preview Bounds" setting. My hope was that Illustrator would use the visual appearance of the text to make the alignment, the same way it does with vector objects. Alas, it was not to be. Illustrator must use a different algorithm when it comes to aligning text objects.
And then I took a clue from Greg's original question -- where he specified that converting the text to outlines would result in the effect he was looking for. And that was just the clue I needed. Maybe if we "fool" the Align palette into thinking that the text has been outlined, it will align the text correctly? And you know what? IT WORKED.
Here's what to do:
1. First, you'll need to go to your Align palette, and you'll need to turn Use Preview Bounds on. You'll only have to do this once as the setting will stay on until you turn it off.
2. Select your text and choose Effect > Path > Outline Object. If you've never used this Effect before, it converts your object (whatever it may be) into outlines -- but as a live effect. The text of course, it still completely editable.
3. Align the text as you did before, selecting the circle and the text. The result, since the Align palette "sees" the outlined text, and since it has Use Preview Bounds turned on, will center the text based on its visual appearance, not based on the heights of the ascenders and descenders.
If this is something you do alot, you can simply set up a Graphic Style that adds the Outline Object effect. So you'd select your text, apply the style, Align the objects, then clear the style from the text. In this way, the text always remains editable, and you get the effect you're looking for.