Tutorial: Applying a Stroke BEHIND Type in Adobe Illustrator
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!
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 "tutorial" tag, please feel free to reblog or tweet about it — let’s share the knowledge!
Tutorial: Multiple Strokes on One Path
This little tip is thanks to RG, who left a comment on the site asking:
“Can you comment on how you make the 2pt of white space between lines show when you have lines cross over each other?”
On most transit maps, route lines will cross over each other at various points. Most of the time, an interchange station exists at that point and the symbol for that covers up the lines as they cross. However, sometimes the route lines will cross without any interaction between them — maybe there’s a bridge, or the lines are in separate tunnels — and it’s a good idea to visually separate them to make that as clear as possible.
STEP 1 above shows the set up: the Red and Blue lines cross over the Yellow and Green lines. As in the last tutorial, these are 8-point-thick lines set on a 10-point grid: I’ll use this a lot, just because it makes the maths easier to follow.
As you can see, the resulting 2pt gap between the Red and Blue lines allows the Yellow and Green lines to butt right up to them and show through the gap — neither of which is desirable. The quick and dirty approach to this problem might be to copy the Red and Blue lines, Paste in Back (Cmd/Ctrl-B), change the stroke colour to white and make these new strokes thicker. This does work, but it’s not the best approach in my eyes. It makes moving or editing those paths further down the track a two-step process (move the coloured route lines, then move the white lines that were underneath them), or a very fiddly single step: selecting objects behind other ones can be a real pain.
So I like to take advantage of a little-used feature of Adobe Illustrator — the fact that one path can have multiple strokes applied to it.
In STEP ONE, I’ve selected the Blue Line and made the Appearance palette visible (Window menu > Appearance or Shift-F6). To add a second stroke to the existing Blue one, simply click and drag that stroke down to the “Duplicate Selected Item” icon at he bottom of the palette as indicated. You can also just click on the stroke, then click on the icon, but I find it more satisfying to drag for some reason. If you really want, you can use the little flyout menu at the top right of the palette and choose “Add New Stroke” or “Duplicate Item” while you have the stroke selected in the main palette.
Bingo! The path now has two strokes, both of which are identical. Fortunately, the palette gives you everything you need to change the new stroke, as shown in STEP TWO. Use the little colour selector to change the second stroke in the palette (which is the stroke that’s behind the other one: the palette displays the stacking order of the path’s elements) to white, then change its stroke width.
The maximum amount you can increase the stroke by is twice the gap between your route lines — in this case, that’s four points (twice two), for a maximum width of 12 points. Any more than this, and the white stroke would start overlapping the Red line next to it. Normally, this amount is exactly what we’re after, so it’s not really a concern.
STEP THREE simply shows the result of performing the same steps on the Red line. Done! The advantage of this technique is that both strokes — being on the same path — can be moved or edited at the same time: there’s no need to fiddle around with two separate paths, one on top of the other.
And if you’re really smart, you’ll make Graphic Styles of these double-stroked lines, so that you can apply them again in the future with just one click.
Technical Review: New Sydney Trains Network Map
It seems that the draft Sydney Trains map that I posted about the other day is the real thing: printed timetables featuring it have been seen and scanned. So, I started looking at it again in order to write a proper review, when I started to notice a lot of little technical things that — as a designer — I found jarring and inconsistent.
I opened the PDF file in Adobe Illustrator and began to poke around. I thought it might be interesting — and perhaps instructive for designers who are interested in making their own transit maps — to show you what I found.
First, apologies for the four separate images: it’s an attempt to get around Tumblr’s maximum 1280px width for pictures. For reference, lets call then NW, NE, SW and SE.
My biggest problem with the map, and what I noticed first, is the wildly inconsistent positioning of labels. The one that really caught my eye was Lindfield on the North Shore Line on the NE map: it’s waaay out of place. St Marys on the Western Line (NW map) is also pretty bad. But, really, almost every label is poorly placed.
To show just how poor, I created cyan guides that are offset a small distance out from the route lines: this seemed to me to be about the right distance away for optimum placement of station labels. Then, for each orientation of label, I created an L-shaped magenta guide that shows both the baseline and the correct alignment (left or right) for the type. I then copy-and-pasted these guides to almost all the labels on the map, being sure to always keep them in the same position relative to each station maker.
As you can see, things are pretty horrific. It’s pretty obvious that there’s no common baseline for labels relative to their stations, nor are they a consistent distance away from the route lines. It’s almost as if each label has been placed individually and then nudged into position, rather than setting up a master set of label positions and applying them as required. Illustrator’s Duplicate function (Command/Control-D) makes this kind of thing so simple: place once, copy elements the required distance to place the next station, then Duplicate, Duplicate, Duplicate until all the stations are quickly and consistently placed.
It can be seen on the North Shore Line (NE map) that even the station dots are inconsistently placed — I’ve put a magenta dot over the top of any station that wasn’t where I expected it to be if things were placed mathematically. Possibly the worst culprits here are Merrylands, Guildford and Yennora stations at the bottom of the NW map: Guildford’s dots aren’t even at the correct angle to each other, and the label placement is completely different for each station. The huge gap between Yennora and Fairfield stations is also pretty ugly: it definitely should be possible to evenly and smoothly space the stations all the way down from Merrylands to Campbelltown.
Some route lines aren’t actually constrained to 45-degree angles: the worst offender is the East Hllls line from Riverwood to Holsworthy (SW map); others are also shown with an overprinting magenta line.
The distance between parallel route lines is inconsistent across the map: this is shown with a little measuring line. The black lines show my base measurement, while the blue lines show inconsistently spaced gaps, which may also be inconsistently spaced with each other! Again, spacing between elements can be controlled easily in Illustrator by entering precise values into the Move dialog box, so this type of thing is very frustrating to see.
The under construction South West Rail Link route is drawn differently to the North West Rail Link: it has no curves where it changes direction and the angled part of the line is too thick. I’ve rotated and overlaid the NW Link on top of the SW Link in cyan to illustrate the difference.
Why is the Macquarie University (NE map) station label set in bold “Interchange” text, but has no interchange ring around the station marker?
Finally, the nesting of curves where parallel routes change direction is very poor throughout the map. Look especially at the City Circle, where huge gaps open up between the route lines at the 90-degree corners. The corners on the orange Bankstown line there aren’t even a consistent radius, being much wider than they are tall.
You know, I really want to like this map. I don’t have any huge attachment to the old one, even though it’s competent enough. Sydney has regularly changed the look of its system map, so we certainly don’t have the same attachment to it that London has to its Tube Map, for example.
This new map is nicely simplified and streamlined, properly full of promise for the new timetabled services. It’s even looks quite friendly and cheerful! However, as a designer, I find it very difficult to look past glaring technical errors like the ones that litter this map, and now I can’t help but see them every darn time I look it.
NOTE: The PDF I edited is slightly older than the one now posted on the Sydney Trains website, but almost every error I talk about is still present in this final version. North Strathfield’s label no longer intersects the T7 Olympic Park line, which is an improvement of sorts.
Map design involves a great deal of technique and precision. Though nowadays programs largely automate this century-old craft, keeping a well-organized workspace will increase your efficiency. Jump past the break to see the three tricks you can use to streamline your workflow.
A great set of transit map-related Adobe Illustrator tips. I’m absolutely kicking myself that I didn’t know that graphic styles can be applied globally to a layer — a huge time-saver!
See also my own tips for designing transit maps.