Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Книги_AutoCad_2 / AutoCAD 2006 and AutoCAD LT 2006 Bible_2004г__.pdf
Скачиваний:
142
Добавлен:
09.04.2015
Размер:
17.83 Mб
Скачать

Chapter 13 Creating Text 325

Understanding Text Styles

You may not always want to use the default font. You can create text styles that give you full creative control over the font, font style (bold, italic, or both), character width, obliquing angle, and text height. You can even design backward, upside-down, and vertical text. (Vertical text is like the text that you occasionally see on the spine of a book. It goes down instead of to the right.)

Text styles are similar to layers, which I discuss in Chapter 11. Like a layer, each text style:

Has a name and several properties

Is saved with the drawing

Can be made current when you want to use it

Can be renamed and deleted

Creating text styles is part of the typical drawing setup procedure. You should include text styles in your drawing templates. AutoCAD and AutoCAD LT come with two types of fonts: the original .shx fonts, which are created using shape files; and TrueType fonts, which are used by most Windows applications.

Cross-

See Chapter 32 for instructions on creating shape files and your own fonts.

Reference

 

Creating a new text style

To create a new text style, choose Format Text Style. This starts the STYLE command and opens the Text Style dialog box, as shown in Figure 13-9.

Figure 13-9: The Text Style dialog box.

Choose New to open the New Text Style dialog box, as shown in Figure 13-10. Type the name of your new text style and click OK. Text style names can be up to 255 characters and can include spaces. You return to the Text Style dialog box where you can define the new text style.

326 Part II Drawing in Two Dimensions

Figure 13-10: The New Text Style dialog box.

Font

In the Font section of the Text Style dialog box, you specify the font, font style, and text height. Click the Font Name drop-down list arrow to see the list of fonts. Fonts with the double-T icon are TrueType fonts. The other fonts are defined in a shape file that has the .shp file name extension. They are compiled into a file with the .shx file name extension for faster access. For more information on working with fonts, see Chapter 32.

Click a font to choose it. You can see a preview of the font in the Preview section of the dialog box. The Preview section also has an edit box. Type some characters and click Preview to see the preview of those characters.

If the font that you’ve chosen supports different styles, such as bold or italic, you can choose one of them in the Font Style drop-down box. None of the AutoCAD or AutoCAD LT fonts supports font styles, but many of the TrueType fonts do.

Type the height that you want for your font. Remember to take into account the scale factor if necessary.

You can leave the height at zero if you want to be able to vary the text height within that one style. If the height is zero, the DTEXT and TEXT commands prompt you for a height when you use these commands to place text.

Caution

If you create a text style using a height other than zero and then use that text style when you

 

define a dimension style, the text style height overrides the text height that you specify sep-

 

arately in the dimension style. See Chapter 15 for more information on dimension styles.

Effects

In the Effects section, you specify the orientation, width factor, and oblique angle of the text style.

The default width factor of characters is set to 1. You can specify a smaller number to compress text and a larger number to expand it, as shown in Figure 13-11.

Width = 1.5

Width = .8

Figure 13-11: Text using different width factors.

Chapter 13 Creating Text 327

The term oblique angle refers to the angle of the individual letters. It is generally used to create an effect, such as italic text. Of course, you don’t need to use an oblique angle if you’re using a TrueType font that supports italic text.

The angle definition used to define oblique text is different from the angle definition used for other objects. Up and down text, which is normal text, has a zero oblique angle. A positive angle slants the text to the right; this is typical for italic text. A negative angle slants the text to the left. Figure 13-12 shows text with a positive and negative oblique angle.

Oblique angle = –10

Oblique angle = 10

Figure 13-12: Text using different oblique angles.

You can create text that is backward (like a mirror image) or upside down. Some fonts also let you create vertical text. Figure 13-13 shows an example of each kind of text. Check the appropriate check box to create the effect that you want.

Figure 13-13: Upside-down, backward, and vertical text.

After you finish defining your text style, click Apply to make it current. Click Close to return to your drawing.

Renaming and deleting text styles

You can rename and delete text styles easily. To rename a text style, start the STYLE command to open the Text Style dialog box. Choose Rename to open the Rename Text Style dialog box. As with the New Text Style dialog box, you can simply enter a new name and click OK.

To delete a text style, choose it from the Style Name drop-down list of the Text Style dialog box and click Delete. A message box asks you to confirm the deletion. Click Yes to delete the text style. Keep in mind that you cannot delete a text style that is being used.

On the

The drawing used in the following exercise on creating text styles, ab13-b.dwg, is in the

CD-ROM

Drawings folder on the CD-ROM.

328 Part II Drawing in Two Dimensions

STEPS: Creating Text Styles

1.Open ab13-b.dwg from your CD-ROM.

2.Save the file as ab13-03.dwg in your AutoCAD Bible folder.

3.Choose Format Text Style to open the Text Style dialog box. Click New. In the New Text Style dialog box, type Notes and click OK.

4.From the Font Name drop-down list, choose romans.shx. In the Height text box, enter a height of 1/16". In the Width Factor text box, enter a width factor of .95. In the Oblique Angle text box, type 10. Click Apply to make the new style current. Click Close.

5.Start the DTEXT command. At the Specify start point of text or [Justify/Style]: prompt, pick a start point at the lower-left corner of the drawing. At the Specify rota-

tion angle of text <0>: prompt, press Enter. At the Enter Text: prompt, type Note: Not drawn to scale. . Press Enter again to end the command.

6.Save your drawing. It should look like Figure 13-14. If you’re going on to the next exercise, keep this drawing open.

Figure 13-14: The addition of text using a new text style.

Modifying a text style

To change a style, choose Format Text Style. From the Style Name drop-down list, choose the text style that you want to change. Make changes in the same way that you did when creating the style. Choose Apply and then Close. The drawing regenerates, and the text that uses the style that you changed is modified accordingly. This is a powerful way to control the look of text in your drawing.

Note

Unfortunately, only changes to the font and text style affect current text. Other changes, such

 

as width factor, oblique angle, orientation, and height, are ignored. However, new text takes

 

on these other changes.

Chapter 13 Creating Text 329

Making a style current or changing a text object’s style

You can choose the current style when you use one of the text commands. If you use DTEXT or TEXT, the command displays the Specify start point of text or [Justify/Style]: prompt. Right-click and choose Style. (The prompt also displays the current style and height.) If you know the name of the style that you want to use, type it and press Enter. The

Specify start point of text or [Justify/Style]: prompt repeats. You can choose the Justify option or pick a start point to continue the command.

If you use MTEXT, the In-Place Text Editor opens, as explained in the next section. Choose the text style that you want from the Style drop-down list.

The Styles toolbar is an easy way to make a style current or change the text style of existing text. To make a style current, choose the style from the Text Style Control drop-down list with no text selected. To change the text style of existing text, select the text and choose a new style from the list. You can also change the style of selected text in the Properties palette.

Importing a text style

As explained in Chapter 11, you can use the DesignCenter to import features from other drawings. To import a text style, follow these steps:

1.Choose DesignCenter from the Standard toolbar to open the DesignCenter.

2.In the left pane, navigate to the drawing that has the text style that you want.

3.Double-click the drawing icon or click its plus sign.

4.To see the list of the text styles, double-click the text style’s icon in either the left or right pane.

5.Double-click the text style’s icon to import it into your drawing.

6.Click the DesignCenter’s Close button to close the DesignCenter.

On the

The drawing used in the following exercise on modifying text styles, ab13-3.dwg, is in the

CD-ROM

Results folder on the CD-ROM.

STEPS: Modifying Text Styles

1.If you have ab13-03.dwg open from the previous exercise, continue to use it for this exercise. Otherwise, open ab13-03.dwg from the Results folder of your CD-ROM.

2.Save the file as ab13-04.dwg in your AutoCAD Bible folder.

3.The note at the bottom-left corner of the drawing uses the Notes text style. Choose Format Text Style. In the Text Style dialog box, make sure that the NOTES style name is listed, and then choose italic.shx from the Font Name drop-down list. Choose Apply and then Close.

4.The drawing regenerates, and the font of the text changes.

5.Save your drawing.

Соседние файлы в папке Книги_AutoCad_2