Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
For the most part, we think about appearances as fills and strokes and applying effects like drop shadows, but the reality is that sometimes we can use these effects to solve everyday problems that we have inside of Illustrator. Let's take this file for an example. It's called buttons.ai, and it's several buttons that I'm working on maybe to create some navigation for a web site or some other kind of design. Now you're probably familiar with the Align panel inside of Illustrator, which helps us align things. In fact, I'm going to open up the Align panel because we're going to use it in this movie. I am going to go to the Window menu and choose Align.
Let's move it about over here, so we can take a better look at it. And we can see that we have some text that appears inside of a button. But if we look at it, the text does not appear vertically centered inside the button. It's kind of a little bit up to the top over here. I just want to show you if I move let's say the text over here--I am going to select both elements. We know that when we're using the Align panel, if we want one object to stay and we want another object to move, once we've made our selection, we can just click again on the object that we want to remain stationary. Notice how it becomes a darker blue.
That lets me know that that object now is what we call a key object inside of Illustrator. In fact, if we look over here on the user interface, a little teeny key appears here. And in the Align panel here, I am going to choose align by their centers. So even though I've aligned it to the center, the word Home does not appear perfectly in the center here. Again, it looks like it shifted up a little bit higher than the exact center. Now, why is that happening? The answer is is that text kind of fits a different profile when it comes to alignment. If I select this object and I have my bounding box turned on, you can actually see that the bounding box for that text is perfectly centered inside of that object.
You see there is an equal amount of space between where the object ends here, the bounding box ends and the shape, and where the bounding box ends here on the shape here. The real difference that we have is that within the bounding box itself the text does not appear to be centered. Well the reason why is because every single font that you use calculates the baseline in a very different way. The font has to also take in to account characters that may drop below the baseline, called descenders--like, for example, lowercase Gs or lowercase Ys--or ascender characters.
Those are characters that extend higher above the X height or above the cap height of a font. In fact, in typography terms, we actually refer to this entire area as the slug. The slug area refers to how much space top-to-bottom my entire font takes up. Now when Illustrator calculates the bounding box of a type object, it's going by that slug size. However, when I'm using all caps, like in this case here, I don't have any letters whatsoever that fall beneath the baseline. So really, I want to align this visually, not by the slug size itself.
Now, how can I do that? The easy way, of course, is to convert the text to outlines. Once I convert my text to outlines, there is no more slug anymore. Now, I'm simply looking at the bounds of the paths themselves, and then I can align it perfectly to the object. However, we all know that once I go ahead and I actually convert this text to outlines, I can no longer make changes to that text. I can't change the font, I can't change the point size, and I certainly can't change it to be different words. Or if I make a typo, I can't make any changes to that either.
So I'd really like to keep this text live and editable, but at the same time I'd really also like to align it visually, not by the slug size. Well, guess what? We can actually use an effect to help us achieve our goal. Now, in order to get this to work, we need to do two things inside of Illustrator. First, we're going to apply an effect to this type object. The effect that we're going to apply is the Outline Object effect. Now remember, we know that if we convert this text to outlines and Illustrator is focused on just the outlines itself and not the slug of the font, we will get a perfect alignment. But I don't want to lose my editable text.
However, if we outline that text as a Live Effect, then Illustrator is giving us those outlines, and we haven't lost the text element. Next we're going to make a slight modification to the Align panel settings to make sure that we get the result that we need. So let's start off by first applying the effect. I have my type object selected. If I look in my Appearance panel right now, I see that my type object is targeted. I'll now go to the Effect menu and I'll choose Path > Outline object. Great! So at this point right now, Illustrator actually created an outlined version of this text.
The only difference is I can't see it right now. Next, I am going to go to the flyout menu of the Align panel, and I am going to choose this option here called Use Preview Bounds. Now normally when you align things, Illustrator looks at the actual structure-- the vector paths themselves-- in order to make the alignment. However, if we choose the Use Preview Bounds option, Illustrator goes by the actual presentation settings-- in other words, the way that the object actually looks and is not actually built.
So I am going to choose this option here, and now I am going to select both elements. I'll click on the actual path itself to turn that into the key object, and now I'll choose to align by the center. And take a look at that. I now get a perfect alignment in my text. Of course at this point once I've aligned it, if I want to, I could simply now remove the Live Effect from that text object. But let's see how easy it is to do now for the other objects. I can take these three objects, hold down the Shift key, and select them.
I can choose Effect > Path > Outline object. What's interesting to note here, by the way, is that when I click on the object, you can now see the bounding box is the exact size of the text itself. Remember how before the bounding box was the size of the slug? Well, since I've applied the Outline Object effect, Illustrator now is looking at the paths and not necessarily the text element. So, I'll select these two elements here, make this the key object, align that to its center, and I'll do the same for the remaining two that are here as well.
Let's select both of these, set the background object as my key object, and align that to the center. Now remember, these are still live and editable text elements. So I could still take my Type tool and highlight the text to make changes to it, because I haven't lost that capability. At the same time, I use the Outline object effect to help me align the text perfectly.
Get unlimited access to all courses for just $25/month.Become a member
117 Video lessons · 42580 Viewers
119 Video lessons · 53959 Viewers
65 Video lessons · 14269 Viewers
113 Video lessons · 82797 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.