Learning Curve: Doing Text in Style

14 Apr, 2005 By: Bill Fane Cadalyst

The basics of AutoCAD's text styles and a few tips to save you a lot of drawing hassles.

It was a warm and sunny afternoon. Suddenly a shout rang out. "Rats! Will this good weather never end?" Captain LearnCurve was getting a little frustrated by the lack of a ski season this year. With nothing better to do, he figured he might as well write about AutoCAD.

Ruminating on his Collected Works that dated back into the last millennium -- 1987, to be exact -- he realized he had never written about text styles. It is high time to correct that.

To begin with, we need to make one thing perfectly clear: Text styles have absolutely nothing to do with textiles, other than eerily similar pronunciation.

We will begin this session with a bit of a treatise on text styles and what they are, then move on to some tips and tricks that can save you a lot of hassles with your AutoCAD drawings.

A Word is Worth .001 of a Picture...
AutoCAD is fundamentally a graphics program, in that we primarily use it to draw pictures of objects. As I explain to my Level 1 drafting class, it would be almost impossible to describe only using words even a simple object such as a dinner fork with sufficient detail and accuracy to allow someone to manufacture one. Now contemplate trying to tell someone how to build a high-rise building or an aircraft carrier by just using words. Pictures, in the form of engineering drawings, rapidly become mandatory if we are trying to instruct someone else how to make something.

That having been said, there are times when we must use words within a drawing. How would you draw a picture of a raw material specification, or a heat-treating process? It therefore becomes necessary to put text in our drawings.

AutoCAD comes with a basic, standard text configuration. This lets you place text within a drawing as soon as you have installed AutoCAD, but it is a pretty minimal type of text. Use the Text command to put a line of text as shown (figure 1) in your drawing.

Figure 1: AutoCAD's standard text style.

Notice how angular it looks. There is an historical reason for this. Actually, there are two, but they both resulted in the same thing.

Once upon a time, before Windows, each application had to have drivers to communicate with the computer hardware. In particular, AutoCAD needed to know how to talk to all the different brands of graphics card it supported. To simplify this for the programmers, AutoCAD would only ever generate lines on screen. A circle was displayed on screen as a multisegment polygon, for example.

The other issue was speed. When I first began using AutoCAD, we were the envy of the Vancouver AutoCAD Users Society ("The world's oldest and most dangerous"). We were one of the first in town to get one of the latest, greatest powerhouse computers: a 6mHz AT. Even then, a dozen lines of text could take longer to regen than all the rest of a drawing. To help speed things up, the standard text font was (and still is) composed entirely of a minimum quantity of straight-line segments. There are no arcs or curves in any character.

These days, the only reason AutoCAD retains this font is for compatibility with earlier releases.

Okay, How Can We Pretty This Up a Bit?
Easy. Start the Style command (Format / Text Style). This brings up the Text Style dialog box (figure 2).

Figure 2: The Text Style dialog box.

Let's start with the Font Name window. Click on the down arrow at the right end of it to display its scroll list. Scroll up and down until you find the ROMANS.SHX entry. Click on it, then on Apply, then on Close.

Now look at the line of standard text in the drawing (figure 3).

Figure 3: The same text as in figure 1, but with a different font.

This looks a little better, doesn't it? The first significant thing to notice here is that AutoCAD went back and retroactively changed the existing text.

The Knowledge Of All Fonts...
There are two kinds of font in AutoCAD. In the early releases, all text fonts were defined by AutoCAD and were held in files with the SHX extension.

In current releases, AutoCAD supports any TrueType font installed on your computer. You can easily distinguish the two kinds of font in the Text Style dialog box because the AutoCAD fonts are all preceded by an AA icon, while the TrueType fonts are preceded by a TT icon.

Okay, what is the real difference between them? The basic difference is that the AutoCAD fonts are all constructed from a series of short line segments. The RomanS sample in figure 3 looks much smoother than the TXT font of figure 1, but if you zoom in on it, or if you plot it at a large scale, its linear origins will be revealed. Similarly, the filled fonts, such as Complex, become simple outlines at a large scale.

TrueType fonts, on the other hand, are fully scalable. No matter how much you zoom in, or no matter how big you plot them, they will still be composed of smooth arc segments and will remain solid.

So which is better? That depends. The AutoCAD fonts are still faster to regenerate, display and plot, but that is less of an issue with current computers and printers unless you have a lot of text in your drawings. The main issue is that their appearance remains consistent with drawings produced in much older AutoCAD releases.

The TrueType fonts tend to be better-looking, especially in larger sizes.

A Heavy Topic
One other difference between the AutoCAD SHX fonts and TrueType fonts is that the AutoCAD fonts react to the line weight setting, but TrueType fonts ignore it.

A common choice is to mix and match. Use an AutoCAD font, such as RomanS, for general notes, title block entries, and dimensions. Pick a suitable TrueType font such as Arial Black for larger text such as Section A-A labels and the company name in the title block.

The next obvious question is, "How do I mix and match? When I changed the font, all existing text in the drawing changed to the new font."

Welcome to the wonderful world of text styles.

Start the Style command again. Click on the New button near the top center. This brings up the New Text Style dialog box, which simply asks you for a name for the new style. Enter Bold, and then click OK. You are returned to Text Style dialog box wherein everything looks as it did before except that the style name now says Bold instead of Standard.

Now go back to the Font Name window and scroll to Arial Black. Click on Apply in the upper right corner of the dialog box, and then on Close.

Start the Text command again and put a second line of text in your drawing, just below the first. AutoCAD uses a font that is different from the previous line (figure 4), so now you know how to use several different fonts in your drawing. All you need to do is to create a new style for each desired font.

Figure 4: Two different text styles.

There are two ways to switch from style to style. The first is to start the Text command. Instead of defining a start point, first enter an S. You will now be prompted for the name of an existing text style. Type one in, press Enter, and the command continues as before but using the new style.

The other way is to start the Style command, pick a style name from the scroll list, then click on Close. The selected style is now the default for future Text commands until you change it.

Clever Text Tricks
There are a number of neat things you can do with text styles. Let's start by going back to the Style dialog box in figure 2. The first place to look is in the lower right corner. Any changes you make reflect instantly in the preview box, so you can try different fonts, upside-down, backwards, vertical, the font style, oblique angle and width factor to see what they will look like. Note that some fonts do not support some options.

Now here is a little-known fact. The Preview button does not seem to do anything -- but it actually does, under the right conditions. See the little window to the left of it that says AaBbCcD? Well, you can type anything you want in this window. When you click the Preview button, the larger Preview window will display the first eight or ten characters or so of the text you entered -- the actual quantity depends on the current style settings -- using the current style settings. The Preview window will automatically update within the current Style session.

Size Matters
Have you noticed how the Text command always asks you for a text height, and defaults to 0.200 This can be a nuisance if you always use the same size text for a specific style, and besides, the default of 0.200 is usually too large. Hmmm, just to make things weirder, the Style dialog box says the size is 0.

Okay, here's the answer. If a text style has a height of 0, then the default size for text is set by the TextSize system variable, which in turn defaults to 0.200. If you change the TextSize variable, that will become the new default.

On the other hand, if a text style has a size larger than 0, that becomes the size for that style, and the Text command will not ask you for a size. You can thus define Small, Standard, and Large styles with appropriate fonts and sizes. Note that the Standard style can be redefined but it cannot be renamed or purged. It must always exist in your drawing.

Ah, but there is a minor drawback to setting a particular size for every style. Specifically, dimension styles each contain a reference back to a related text style. This defines the font and so on for the dimension numbers. If the text style used in a dimension style has a height of 0, the text height is controlled by the dimension style text size setting multiplied by the overall dimension scale factor.

On the other hand, if the text style used in a dimension style specifies a height greater than 0, that defines the dimension text size, and the dimension style settings are ignored.

The sneaky bit is that at first everything may appear to be okay, but the minute you update a dimension or edit the dimension style scale factor, the text style size kicks in.

The best bet, then, is usually to have one extra Dimensions text style with height of 0 to be used in dimension styles.

Okay, now that you have all your text styles set up correctly, what do you do next? Easy. You save the file as a template file. Now, whenever you start a new drawing, simply start from this template and all your text styles will be set up correctly.

And Now For Something Completely Different...
If you have young children in your house, or grandchildren visiting, do not leave a permanent-ink marker pen where they can find it.

More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!

For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!