2013
Table Of Contents
- Contents
- Basic Customization
- Custom Linetypes
- Custom Hatch Patterns
- User Interface Customization
- DIESEL
- Command Scripts
- Introduction to Programming Interfaces
- Shapes and Shape Fonts
- Overview of Shape Files
- Create Shape Definition Files
- Shape Descriptions
- Vector Length and Direction Code
- Special Codes
- Use Special Codes
- Codes 0, 1, and 2: End of Shape and Draw Mode Control
- Codes 3 and 4: Size Control
- Codes 5 and 6: Location Save/Restore
- Code 7: Subshape
- Codes 8 and 9: X-Y Displacements
- Code 00A: Octant Arc
- Code 00B: Fractional Arc
- Codes 00C and 00D: Bulge-Specified Arcs
- Code 00E: Flag Vertical Text Command
- Text Font Descriptions
- Sample Files
- Big Font Descriptions
- Unicode Font Descriptions
- Superscripts and Subscripts in SHX Files
- Index
Shape Descriptions
AutoCAD font and shape files (SHX) are compiled from shape definition files
(SHP). You can create or modify shape definition files with a text editor or
word processor that saves files in ASCII format.
The syntax of the shape description for each shape or character is the same
regardless of the final use (shape or font) for that shape description. If a shape
definition file is to be used as a font file, the first entry in the file describes
the font itself rather than a shape within the file. If this initial entry describes
a shape, the file is used as a shape file.
Being able to create your own shape definitions is a valuable skill. Keep in
mind, however, that this is a very complex subject to learn and requires
patience.
Each line in a shape definition file can contain up to 128 characters. Longer
lines cannot be compiled. Because AutoCAD ignores blank lines and text to
the right of a semicolon, you can embed comments in shape definition files.
Each shape description has a header line of the following form and is followed
by one or more lines containing specification bytes, separated by commas and
terminated by a 0.
*shapenumber,defbytes,shapename
specbyte1,specbyte2,specbyte3,...,0
The following list describes the fields of a shape description:
shapenumber A number, unique to the file, between 1 and 258 (and up to
32768 for Unicode fonts), and preceded by an asterisk (*). Non-Unicode font
files use the shape numbers 256, 257, and 258 for the symbolic identifiers
Degree_Sign, Plus_Or_Minus_Sign, and Diameter_Symbol. For Unicode fonts
these glyphs appear at the U+00B0, U+00B1, and U+2205 shape numbers and
are part of the “Latin Extended-A” subset.
Text fonts (files containing shape definitions for each character) require specific
numbers corresponding to the value of each character in the ASCII code; other
shapes can be assigned any numbers.
defbytes The number of data bytes (specbytes) required to describe the shape,
including the terminating 0. The limit is 2,000 bytes per shape.
shapename The shape name. Shape names must be uppercase to be recognized.
Names with lowercase characters are ignored and are usually used to label
font shape definitions.
Create Shape Definition Files | 111