The CHP is never stored in Word files. It is the result of decompression operations applied to CHPXs
The CHPX is stored in CHPX FKPS and within the STSH
Note
When a CHPX is stored in an FKP it is prefixed by a one-byte count of bytes that records the size of the non-zero prefix of the CHPX. Since the count of bytes must begin on an even boundary within the FKP followed by the non-zero prefix, it's guaranteed that the int and FC fields of the CHPX are aligned on an odd-byte boundary. Using normal integer or long load instructions will cause address errors on a 68000. The best technique for reconstituting the CHPX is to move the non-zero prefix to the beginning of a local instance of a CHPX that has been cleared to zeros.
b10 | b16 | field | type | size | bitfield | comment | |
0 | 0 | fBold | short | :1 | 0001 | text is bold when 1 , and not bold when 0. | |
FItalic | short | :1 | 0002 | italic when 1, not italic when 0 | |||
fRMarkDel | short | :1 | 0004 | when 1, text has been deleted and will be displayed with strikethrough when revision marked text is to be displayed | |||
fOutline | short | :1 | 0008 | outlined when 1, not outlined when 0 | |||
fFldVanish | short | :1 | 0010 | used internally by Word | |||
fSmallCaps | short | :1 | 0020 | displayed with small caps when 1, no small caps when 0 | |||
fCaps | short | :1 | 0040 | displayed with caps when 1, no caps when 0 | |||
fVanish | short | :1 | 0080 | when 1, text has "hidden" format, and is not displayed unless fPagHidden is set in the DOP | |||
1 | 1 | fRMark | short | :1 | 0100 | when 1, text is newly typed since the last time revision marks have been accepted and will be displayed with an underline when revision marked text is to be displayed | |
fSpec | short | :1 | 0200 | character is a Word special character when 1, not a special character when 0 | |||
fStrike | short | :1 | 0400 | displayed with strikethrough when 1, no strikethrough when 0 | |||
fObj | short | :1 | 0800 | embedded object when 1, not an embedded object when 0 | |||
fShadow | short | :1 | 1000 | character is drawn with a shadow when 1; drawn without shadow when 0 | |||
fLowerCase | short | :1 | 2000 | character is displayed in lower case when 1. No case transformation is performed when 0. This field may be set to 1 only when chp.fSmallCaps is 1. | |||
fData | short | :1 | 4000 | when 1, chp.fcPic points to an FFDATA, the data structure binary data used by Word to describe a form field. The bit chp.fData may only be 1 when chp.fSpec is also 1 and the special character in the document stream that has this property is a chPicture (0x01). | |||
fOle2 | short | :1 | 8000 | when 1, chp.lTagObj specifies a particular object in the object stream that specifies the particular OLE object in the stream that should be displayed when the chPicture fSpec character that is tagged with the fOle2 is encountered. The bit chp.fOle2 may only be 1 when chp.fSpec is also 1 and the special character in the document stream that has this property is a chPicture (0x01). | |||
2 | 2 | fEmboss | short | :1 | 0001 | text is embossed when 1 and not embossed when 0 | |
fImprint | short | :1 | 0002 | text is engraved when 1 and not engraved when 0 | |||
fDStrike | short | :1 | 0004 | displayed with double strikethrough when 1, no double strikethrough when 0 | |||
fUsePgsuSettings | short | :1 | 0008 | ||||
short | :12 | FFF0 | Reserved | ||||
4 | 4 | long | Reserved | ||||
8 | 8 | ftc | short | no longer stored | |||
10 | A | ftcAscii(rgftc[0]) | short | font for ASCII text | |||
12 | C | ftcFE(rgftc[1]) | short | font for Far East text | |||
14 | E | ftcOther(rgftc[2]) | short | font for non-Far East text | |||
16 | 10 | hps | unsigned short | font size in half points | |||
18 | 12 | dxaSpace | long | space following each character in the run expressed in twip units. | |||
22 | 16 | iss | short | :3 | 0007 | superscript/subscript indices | |
kul | short | :4 | 0078 | underline code: | |||
fSpecSymbol | short | :1 | 0080 | used by Word internally, not stored in file | |||
23 | 17 | ico | short | :5 | 1F00 | color of text: | |
short | :1 | 2000 | reserved | ||||
fSysVanish | short | :1 | 4000 | used by Word internally, not stored in file | |||
hpsPos | short | :1 | 8000 | reserved | |||
24 | 18 | short | super/subscript position in half points; positive means text is raised; negative means text is lowered. | ||||
26 | 1A | lid | LID | language identification code | |||
Language Name | Language ID | ||||||
28 | 1C | lidDefault(rglid[0]) | LID | language for non-Far East text | |||
30 | 1E | lidFE(rglid[1]) | LID | language for Far East text | |||
32 | 20 | idct | unsigned char | not stored in file | |||
33 | 21 | idctHint | unsigned char | Identifier of Characte type | |||
0->shared chars get non-FE props | |||||||
1->shared chars get FE props | |||||||
(see Appendix C) | |||||||
34 | 22 | wCharScale | unsigned short | ||||
36 | 24 | fcPic | FC | offset in data stream pointing to beginning of a picture when character is a picture character (character is 0x01 and chp.fSpec is 1) | |||
36 | 24 | fcObj | FC | offset in data stream pointing to beginning of a picture when character is an OLE1 object character (character is 0x20 and chp.fSpec is 1, chp.fOle2 is 0) | |||
36 | 24 | lTagObj | unsigned long | long word tag that identifies an OLE2 object in the object stream when the character is an OLE2 object character. (character is 0x01 and chp.fSpec is 1, chp.fOle2 is 1) | |||
40 | 28 | ibstRMark | short | index to author IDs stored in hsttbfRMark. used when text in run was newly typed when revision marking was enabled | |||
42 | 2A | ibstRMarkDel | short | index to author IDs stored in hsttbfRMark. used when text in run was deleted when revision marking was enabled | |||
44 | 2C | dttmRMark | DTTM | Date/time at which this run of text was entered/modified by the author. (Only recorded when revision marking is on.) | |||
48 | 30 | dttmRMarkDel | DTTM | Date/time at which this run of text was deleted by the author. (Only recorded when revision marking is on.) | |||
52 | 34 | short | reserved | ||||
54 | 36 | istd | unsigned short | index to character style descriptor in the stylesheet that tags this run of text When istd is istdNormalChar (10 decimal), characters in run are not affected by a character style. If chp.istd contains any other value, chpx of the specified character style are applied to CHP for this run before any other exceptional properties are applied. | |||
56 | 38 | ftcSym | short | when chp.fSpec is 1 and the character recorded for the run in the document stream is chSymbol (0x28), chp.ftcSym identifies the font code of the symbol font that will be used to display the symbol character recorded in chp.xchSym. chp.ftcSym is an index into the rgffn structure. | |||
58 | 3A | xchSym | XCHAR | when chp.fSpec is 1 and the character recorded for the run in the document stream is chSymbol (0x28), the character stored chp.xchSym will be displayed using the font specified in chp.ftcSym. | |||
60 | 3C | idslRMReason | short | an index to strings displayed as reasons for actions taken by Word's AutoFormat code | |||
62 | 3E | idslReasonDel | short | an index to strings displayed as reasons for actions taken by Word's AutoFormat code | |||
64 | 40 | ysr | unsigned character | hyphenation rule | |||
65 | 41 | chYsr | unsigned character | the character that will be used to add or change a letter when chp.ysr is 2,3, 5 or 6 | |||
66 | 42 | cpg | unsigned short | ||||
68 | 44 | hpsKern | unsigned short | kerning distance for characters in run recorded in half points | |||
70 | 46 | icoHighlight | short | :5 | 001F | highlight color (see chp.ico) | |
fHighlight | short | :1 | 0020 | when 1, characters are highlighted with color specified by chp.icoHighlight. | |||
kcd | short | :3 | 01C0 | ||||
fNavHighlight | short | :1 | 0200 | used internally by Word | |||
fChsDiff | short | :1 | 0400 | ||||
fMacChs | short | :1 | 0800 | ||||
fFtcAsciSym | short | :1 | 1000 | ||||
short | :3 | E000 | Reserved | ||||
72 | 48 | fPropMark | unsigned short | when 1, properties have been changed with revision marking on | |||
74 | 4A | ibstPropRMark | short | index to author IDs stored in hsttbfRMark. used when properties have been changed when revision marking was enabled | |||
76 | 4C | dttmPropRMark | DTTM | Date/time at which properties of this were changed for this run of text by the author. (Only recorded when revision marking is on.) | |||
80 | 50 | sfxtText | unsigned char | text animation: | |||
81 | 51 | unsigned char | reserved | ||||
82 | 52 | unsigned char | reserved | ||||
83 | 53 | unsigned short | reserved | ||||
85 | 55 | short | reserved | ||||
87 | 57 | DTTM | reserved | ||||
91 | 5B | fDispFldRMark | byte | (Only valid for ListNum fields). When 1, the number for a ListNum field is being tracked in xstDispFldRMark-if that number is different from the current value, the number has changed. | |||
92 | 5C | ibstDispFldRMark | short | Index to author IDs stored in hsttbfRMark. used when ListNum field numbering has been changed when revision marking was enabled | |||
94 | 5E | dttmDispFldRMark | DTTM | The date for the ListNum field number change | |||
98 | 62 | xstDispFldRMark | XCHAR[16] | The string value of the ListNum field when revision mark tracking began | |||
130 | 82 | shd | SHD | shading | |||
132 | 84 | brc | BRC | border |
cbCHP (count of bytes of CHP) is 136 (decimal), 88(hex).
The standard CHP is all zeros except:
hps | 20 half-points |
fcPic | -1 |
istd | 10 (the standard character style) |
lidDefault, lidFE | 0x0400 (no proofing) |
wCharScale | 100 |
fUsePgsuSettings | -1 |