Let me preface this tutorial by saying that — without a shadow of a doubt — this is my number one most favourite, time-saving, map-making Adobe Illustrator trick ever.
When making transit maps, it’s preferable — for both aesthetics and readability — to not have any labels overlay a route line or other elements. However, sometimes it’s simply unavoidable, as in the detail of my Boston MBTA map redesign at the top of the image above (circled in blue). When you absolutely have to overlay type over another element, it’s a good idea to separate it from that element with a stroke (or “keyline”) around the type that’s the same colour as your map’s background (often white with transit maps).
“Well, that’s easy,” I hear you say, “I’ll just duplicate the text, put the copy behind the original and apply a stroke to that duplicate!”
That’s well and good for isolated examples, but what if you’ve got lots of text that you need to do this to? Or what if you make a typo in the label? Using this method, you’d have to correct it twice – once for each duplicate of the label.
There’s a better way to do it: you just need to know one little trick.
STEP ONE above shows a typical text label and Illustrator’s Appearance palette (Window menu > Appearance or Shift-F6). Note that the text is made up of a black fill with no stroke: the standard appearance for text.
In STEP TWO, I’ve applied a 2-point magenta stroke to the text (You’d probably want to use the same stroke colour as the background of your map; I’ve just used magenta to make the effect easier to see). The stroke sits on top of the fill in the stacking order, and — try as you might — can’t be demoted to sit underneath the fill, where we want it to be: note how the visibility icons for each are greyed out, meaning they can’t be moved. Strangely, the stacking order of text fills and strokes cannot be changed in Illustrator.
(If you’ve ever tried to add a stroke to a text object in Illustrator before, this is where you’ve probably given up in disgust.)
So, here’s the good bit.
In STEP THREE, I’ve drawn a rectangle and given it the fill and stroke that we want the text to eventually have: a black fill and a 2-point magenta stroke. I also like to give my stroke corners a round join — it softens the stroke a little and generally looks better than a mitre join.
Unlike type objects, the stacking order for normal objects or paths is editable, so — while the rectangle is selected — drag the stroke below the path in the Appearance palette. The stroke will now sit behind the fill on the actual rectangle.
STEP FOUR: Open the Graphic Styles palette (Window menu > Graphic Styles or Shift-F5) and drag the rectangle into the palette. You’ve just made a graphic style out of the attributes of the rectangle (stacking order included), which you can now apply to other objects with just a couple of clicks. If you like, give it a descriptive name: I’ve called mine “Keylined Type”.
STEP FIVE: Delete the rectangle: it’s done its work. Select the label text, then click on your newly created “Keylined Text” graphic style. The label now has a stroke that sits behind the fill, just where we want it, as STEP SIX shows in the Appearance palette. Even better, the fill and stroke are now fully adjustable and editable — change the colour, stroke width, or even move the stroke back above the fill!
For new labels that need to look the same, you can either duplicate the one you’ve just made, or simply type the label and then apply the graphic style as needed. No more typing text labels twice, just because you need a keyline around it!
ADDENDUM: There’s always more than one way to do things in Adobe Illustrator. As I’ve had pointed out to me, you can skip the step that requires you to draw and style another object by adding a new stroke to the text in a particular way. If you select your text with the arrow tool, and then use the “Add New Stroke” button at the bottom of the Appearance palette (or the same command via the palette’s flyout menu), that stroke becomes fully editable and stackable. You can then make a new graphic style directly from your text. Why does it work when you add a stroke to text via the palette and not when you add it by simply clicking on a colour to use as a stroke? No good reason I can see!
P.S. If you like this tip, or any others that I’ve posted under the “tutorials” category, please feel free to share, reblog or tweet about it – let’s share the knowledge!
Nice trick for me as a new in Adobe Illustrator, thank you…
Genius! A thousand times, thank you!