0

The standard answer to the question of how to add a fill to a text box in Illustrator isn't working for me because it assumes that the text is horizontal. I'm creating a map in which virtually all the text is either on a path or at an angle, and the geniuses at Adobe decided that the text box fill should cover the x/y coordinates of the text box rather than the text box itself.

Are there any workarounds other than painstakingly placing a rectangle or stroke object behind every label? (It's a large map with about 500 labels, so the manual approach doesn't have much appeal.) A script or a plug-in perhaps?

diagonal map label

1
  • Its not assuming text is horisontal it just makes a world aligned box around anything you wish. That is useful for a lot of things that are rotated. But obviously its not the tool for this job. You can script this no problem. Is it a point text or a text in a frame?
    – joojaa
    Commented Nov 3, 2020 at 6:30

2 Answers 2

1

Assumption: The background fill is created via the Appearance panel and the Convert to Rectangle effect. As described here. Note that for this effect to work well, you should start with straight horizontal, unrotated, text. Rotate it after it has been created using the effect described below.


Effect > Distort & Transform > Transform... Will rotate the text and the extra fill. With the added addition of easily editing the rotation again if necessary.

enter image description here

0

This is not a fully automated approach, but it may help you. Anything more automated would likely require scripting.

  1. Draw a rectangle, and click on the outline with the Area Type tool to add some text to the shape.

  2. Use the Direct Selection tool (A), to select the box, open the Appearance Panel and change the fill.

  3. Select the text with the Text Tool, and in the Paragraph settings set the text to centred, and in the Character settings adjust the baseline so the text is centred vertically inside the box.

You should end up with something like this

enter image description here

  1. To rotate, use the Rotate Tool (R)

  2. Once you have one text box made, you can just copy and paste it for additional labels and edit the the text with the Text Tool.

  3. You use the Selection tool (V) to click and drag the edge handle of the box to resize it for longer/shorter text.

enter image description here

8
  • Thanks, Billy. That would be the most efficient way to manually add the backgrounds when starting from scratch, but unfortunately I'm having to enlarge ~500 existing labels and retrofit the background fills. Also, ~200 of them are text on paths (curvy country roads), which will require open-path backgrounds rather than rectangles. A clusterf**k. Realistically this will probably require a scripted solution. :-(
    – Bill Gregg
    Commented Nov 3, 2020 at 13:55
  • @Billy Kerr, Instead of adjusting the baseline you can now center text within a text-box in Illustrator. They added this functionality with the latest release.
    – dom
    Commented Nov 3, 2020 at 18:34
  • @dom yes absolutely, but not everyone is using the latest version yet (including me).
    – Billy Kerr
    Commented Nov 3, 2020 at 18:38
  • @BillGregg - yeah, I feel your pain.
    – Billy Kerr
    Commented Nov 3, 2020 at 18:38
  • @BillGregg ahaa the text on path ones should be easy to handle. Just assign a fill to the path (not text) and offset it
    – joojaa
    Commented Nov 3, 2020 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.