天天看点

03-07 创建和编辑AutoCAD实体(七) 向图形中添加文字(4)使用Unicode字符及其他...4、UseUnicode Characters, Control Codes, and Special Characters使用Unicode字符、控制码、特殊字符5、SubstituteFonts替换字体6、CheckSpelling拼写检查

4、UseUnicode Characters, Control Codes, and Special Characters使用Unicode字符、控制码、特殊字符

You can use Unicode characters, controlcodes, and special characters in a text string to represent symbols. (Allnontext characters must be entered as their ASCII equivalent.)

我们可以在文本串中使用Unicode字符、控制码、及特殊字符来表示各种符号。(所有非文本字符都必须键入其相应的ASCII码。)

You can create special characters byentering the following Unicode character strings:

我们可以通过键入下列Unicode字符串来创建特殊符号:

Unicode character descriptions

Unicode字符描述

Unicode character

Unicode字符

Description

描述

\U+00B0 Degree symbol度(°)符号
\U+00B1 Plus/minus tolerance symbol(±)公差符号
\U+2205 Diameter dimensioning symbol(φ)直径符号

In addition to using Unicode characters for specialcharacters, you can specify a special character by including controlinformation in the text string. Use a pair of percent signs (%%) to introduceeach control sequence. For example, the following control code works withstandard AutoCAD text and PostScript fonts to draw character number nnn:

除了使用Unicode字符来产生特殊符号外,我们还可以通过在文本串中包含控制信息的方式来指定特殊符号。每个控制指令前放两个百分号(%%)。例如,下列控制码使用标准AutoCAD文字和PostScript字体绘制数字字符nnn。

%%nnn      

These control codes work with standard AutoCAD text fontsonly:

下面这些控制码只使用标准AutoCAD文字字体:

Control code descriptions

控制码描述

Control code

 控制码

Description

 描述

%%o Toggles overscore mode on and off 上划线模式开/关
%%u Toggles underscore mode on and off 下划线模式开/关
%%d Draws degree symbol 绘制度(°)符号
%%p Draws plus and minus tolerance symbol 绘制(±)公差符号
%%c Draws diameter dimensioning symbol 绘制(φ)直径符号
%%% Draws single percent sign 绘制%单个百分号

5、SubstituteFonts替换字体

You can designate fonts to be substitutedfor other fonts or as defaults when AutoCAD cannot find a font specified in adrawing.

当AutoCAD找不到图形中指定的字体时,我们可以为其选择替换字体,或者选择默认字体。

The fonts used for the text in yourdrawing are determined by the text style and, for MText, by individual fontformats applied to sections of text.

图形中文字的字体是由所用文字样式确定的,对多行文字,则是由文字各部分的不同字体格式确定的。

You can use font mapping tables to ensurethat your drawing uses only certain fonts, or to convert the fonts you used toother fonts. You can use these font mapping tables to enforce corporate fontstandards, or to facilitate offline printing. AutoCAD comes with a default fontmapping table. You can edit this file using any ASCII text editor. You also canspecify a different font mapping table file by using the FONTMAP systemvariable.

我们可以用字体映射表来确保图形使用正确的字体,或将所用字体换成其他字体。我们可以使用这些字体映射表来执行团队字体标准,以及方便离线打印。AutoCAD含有默认字体映射表,我们可以使用任何ASCII文本编辑器编辑这个表文件,我们还可以通过使用FONTMAP系统变量来另外指定一个字体映射表文件。

For more information about font mappingtables and substituting fonts, see “Substitute Fonts” in the AutoCAD User'sGuide.

关于字体映射表及替换字体的更多内容,见AutoCAD用户指南中的“替换字体”。

Specify an Alternative Default Font 指定默认替换字体

If your drawing specifies a font that isnot currently on your system, AutoCAD automatically substitutes the fontdesignated as your alternate font. By default, AutoCAD uses the simplex.shxfile. However, you can specify a different font if necessary. Use the FONTALTsystem variable to set the alternative font file name.

如果图形中指定的字体在当前系统中不存在,AutoCAD会自动替换成预先选定的替换字体。默认情况下,AutoCAD使用simplex.shx文件作为替换字体。不过,如果必要,我们可以指定一个别的字体。设置替换字体文件使用FONTALT系统变量。

If you use a text style that uses a BigFont, you can map it to another font using the FONTALT system variable. Thefont mapping must be done in pairs of font files: txt.shx, bigfont.shx.

如果所用文字样式使用了Big FONT字体,我们也可以用FONTALT系统变量将其映射为别的字体。字体映射必须使用成对的字体文件:txt.shx, bigfont.shx。

If AutoCAD cannot find a font file when a drawing isopened, it applies a default set of font substitution rules.

打开图形时,如果AutoCAD找不到某个字体文件,会使用字体替换规则的默认设置。

6、CheckSpelling拼写检查

During a spelling check, AutoCAD matchesthe words in the drawing to the words in the current main dictionary. Any wordsyou add are stored in the custom dictionary that is current at the time of thespelling check. For example, you can add proper names so that AutoCAD no longeridentifies them as misspelled words.

在拼写检查过程中,AutoCAD拿图形中的单词与当前主词典中的单词相匹配。我们添加的任何单词都会储存在自定义词典里,并将其作为拼写检查时的当前自定义词典。我们可以往自定义词典里添加适当的名字,这样AutoCAD就不再对其进行拼写检查。

To check spelling in another language, youcan change to a different main dictionary.

其他语言的拼写检查,可以换不同的主词典进行。

There is no method for checking spellingprovided in the AutoCAD .NET API. However, you can specify a different maindictionary using the DCTMAIN system variable, or a different custom dictionaryusing the DCTCUST system variable.

AutoCAD .NET API没有提供有关拼写检查的方法,不过,我们可以使用系统变量DCTMAIN来指定主词典,使用系统变量DCTCUST来指定自定义词典。

For more information about spellingschecks, see “Check Spelling” in the AutoCAD User's Guide.

关于拼写检查的更多内容,见AutoCAD用户指南的“拼写检查”一节。

继续阅读