8.3.1 Characters and Paragraphs
Both the character and paragraph sections are structured as a set of pages. Each page contains an array of FODs and a group of FPROPs, both of which are described later in this section. Following is the format of a page:
0–3 |
fcFirst |
Byte number of first character covered by this page of formatting information; equals 128 for first character in the text (low-order byte first) |
4–n |
rgfod |
Array of FODs |
n+1–126 |
grpfprop |
Group of FPROPs |
127 |
cfod |
Number of FODs on this page |
An FOD is fixed in size. It contains the byte offset to the corresponding FPROP. Following is the structure of an FOD:
0–1 |
fcLim |
Byte number after last character covered by this FOD |
2 |
bfprop |
Byte offset from beginning of FOD array to corresponding FPROP for these characters or this paragraph |
An FPROP is variable in size. It contains the prefix for a character property (CHP) or paragraph property (PAP), both of which are described later in this section. Following is the structure of an FPROP:
0 |
cch |
Number of bytes in this FPROP |
1–n |
rgchProp |
Prefix for a CHP (for characters) or a PAP (for paragraphs) sufficient to include all bits that differ from the default CHP or PAP |
Following is the format of a CHP:
Byte |
Bit |
Name |
Description |
0 |
|
|
Reserved; ignored by Write |
1 |
0 |
fBold |
Bold characters |
|
1 |
fItalic |
Italic characters |
|
2–7 |
ftc |
Font code (low bits); index into the FFNTB |
2 |
|
hps |
Size of font, in half points (standard is 24) |
3 |
0 |
fUline |
Underlined characters |
|
1 |
fStrike |
Reserved; ignored by Write |
|
2 |
fDline |
Reserved; ignored by Write |
|
3 |
fOverset |
Reserved; ignored by Write |
|
4–5 |
csm |
Reserved; ignored by Write |
|
6 |
fSpecial |
Set for "(page)" only |
|
7 |
|
Reserved; ignored by Write |
4 |
0–2 |
ftcXtra |
Font code (high-order bits, concatenated with ftc) |
|
3 |
fOutline |
Reserved; ignored by Write |
|
4 |
fShadow |
Reserved; ignored by Write |
|
5–7 |
|
Reserved; ignored by Write |
5 |
|
hpsPos |
Position: 0=normal, 1–127=superscript, 128–255=subscript |
If the user doesn't select any special character properties, the CHP is filled with the following default values:
Each character FPROP must, therefore, have a count of characters (cch) greater than or equal to 1.
Each PAP can contain up to 14 tab descriptors (TBDs), which are described later in this section. Following is the structure of a PAP:
Byte |
Bit |
Name |
Description |
0 |
|
|
Reserved; must be zero |
1 |
0–1 |
jc |
Justification: 0=left, 1=center, 2=right, 3=both |
|
2–7 |
|
Reserved; must be zero |
2 |
|
|
Reserved; must be zero |
3 |
|
|
Reserved; must be zero |
4–5 |
|
dxaRight |
Right indent, in 20ths of a point |
6–7 |
|
dxaLeft |
Left indent, in 20ths of a point |
8–9 |
|
dxaLeft1 |
First-line left indent (relative to dxaLeft) |
10–11 |
|
dyaLine |
Interline spacing (standard is 240) |
12–13 |
|
dyaBefore |
Reserved; ignored by Write (standard is zero) |
14–15 |
|
dyaAfter |
Reserved; ignored by Write (standard is zero) |
16 |
0 |
rhcPage |
0=header, 1=footer |
|
1–2 |
|
Reserved; 0=normal paragraph, nonzero=header or footer paragraph |
|
3 |
rhcFirst |
Start of printing: 1=print on first page, 0=do not print on first page |
|
4 |
fGraphics |
Paragraph type: 1=picture, 0=text |
|
5–7 |
|
Reserved; must be zero |
17–21 |
|
|
Reserved; must be zero |
22–78 |
|
|
Tab descriptors (up to 14) |
Following is the format of a TBD:
Byte |
Bit |
Name |
Description |
0–1 |
|
dxa |
Indent from left margin of tab stop, in 20ths of a point |
2 |
0–2 |
jcTab |
Tab type: 0=normal tabs, 3=decimal tabs |
|
3–5 |
tlc |
Reserved; ignored by Write |
|
6–7 |
|
Reserved; must be zero |
3 |
|
chAlign |
Reserved; ignored by Write |
If the user doesn't select any special paragraph properties, the PAP is filled with the following default values:
0 |
61 |
2 |
30 |
10–11 |
240 (word) |
12–78 |
0 |
Each paragraph FPROP must have a count of characters (cch) greater than or equal to 1.