I am new to AutoCAD and am trying to figure out the SHP/SHX file
format. I have read through Chapter 3 of AutoCAD R13 Customization
Guide (related to SHP files) and just ordered Maximizing AutoCAD R13
(I will not have it for at least a few days). I'm trying to parse
these files on my own (for single-stroke fonts).
I more or less understand the SHP/SHX file formats. But, I'm having
trouble with a Chinese bigfont called "gbcbig.shx". The following text
are the header info and the "zhong1" (0xD6D0) character. It seems all
of the characters in the file have the same three starting bytes and
three ending bytes.
*BIGFONT 7703,1,0A1,0FE
*0,4,¹¤³Ìºº×Ö×Ö·û¼¯ 1998.1. FAW/Autodesk CTC CBX(0293)
0,64,2,0
*0D6D0,46,ÖÐ
7,-114,5,2,8,(12,62),1,8,(42,5),2,8,(-42,5),1,8,(0,-44),2,8,(21,62),1,8,(0,-89),
2,8,(22,68),1,8,(-3,-30),2,8,(2,0),1,8,(-42,-5),7,-113,0
I do not understand the beginning "7,-114,5," and ending ",7,-113,0".
Code 7 means that the next byte (-114 = 0x8E) is a subshape code
referencing another record (in the same file?). The end has a similar
command (-113 = 0x8F). But, gbcbig.shx does not contain characters
0x8E or 0x8F (I could not find them).
Also, the "5" after "7,-114" at the beginning seems to indicate a
"position stack push" command. But, there is no corresponding "pop"
command later in the record, causing my parsing code to generate stack
overflow errors. The file does however load properly into SHXVIEW.EXE
without generating warnings or errors.
I read that code 7 is actually followed by two bytes (although not
documented). This makes sense in a BIGFONT file. But, I also could not
find codes 0x058E or 0x8E05, and there is no room for another byte
after "7,-113" and before the "0" terminator at the end of the record.
Can someone tell me what I'm missing? The Customization Guide just
does not have much detail, and may be out of date with respect to this
font file.
TIA For any help
- Chris