2012
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
*00080,4,keuroRef
7,020AC,0
The second field in the header represents the total number of bytes in the
shape description. If you are not used to working with Unicode font
descriptions, you may be inclined to use three bytes rather than four, but this
would cause an error during the compiling of the SHP file. This is true even
if the shape number you are referencing is not in the two-byte range (below
255); the compiler always uses two bytes for this value, so you must account
for that in the header.
The only other difference between Unifont shape definitions and regular shape
definitions is the shape numbers. The Unifont shape definitions that AutoCAD
for Mac provides use hexadecimal shape numbers as opposed to decimal values.
Although hexadecimal numbers are not required, their use makes it easier to
cross-reference the shape numbers with the \U+ control character values.
Superscripts and Subscripts in SHX Files
You can modify shape definition files to improve their ability to display
superscripts and subscripts.
The AutoCAD for Mac SHX fonts have limited superscript and subscript
capabilities. However, it is relatively easy to modify shape definition files to
improve superscript and subscript capability.
Creating superscripts and subscripts requires two steps. First, the “imaginary
pen” that is creating the text, vector by vector, on your screen needs to be
shifted up or down. Then, the font “scale” needs to be reduced. In addition,
the reverse process has to take place to return to the normal font. The font
needs to recognize four new keys: two for superscripts and two for subscripts.
To avoid altering the existing font definitions, you can access these with the
numeric keypad on your keyboard.
Superscripts and Subscripts in SHX Files
To add superscript and subscript definitions to a font
This example procedure is based on the AutoCAD for Mac Romans font file,
although a similar method applies to any AutoCAD for Mac font. This
procedure adds four new shape definitions to a font: super_on, super_off,
sub_on, and sub_off, which control the position and size of the characters
Create Shape Definition Files | 177