|
1 {\rtf1\ansi \deff4\deflang1033{\fonttbl{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f5\fswiss\fcharset0\fprq2 Arial;}{\f11\fmodern\fcharset0\fprq1 Courier New;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255; |
|
2 \red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0; |
|
3 \red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\widctlpar \f4\fs20\lang2057 \snext0 Normal;}{\s1\sb240\sa60\keepn\widctlpar \b\f5\fs28\lang2057\kerning28 \sbasedon0\snext0 heading 1;}{\s2\sb240\sa60\keepn\widctlpar |
|
4 \b\i\f5\lang2057 \sbasedon0\snext0 heading 2;}{\s3\sb240\sa60\keepn\widctlpar \b\f4\lang2057 \sbasedon0\snext0 heading 3;}{\*\cs10 \additive Default Paragraph Font;}}{\info{\title Protea font file format}{\author Steve Townsend}{\operator Lane Roberts} |
|
5 {\creatim\yr1995\mo6\dy5\hr13\min36}{\revtim\yr1999\mo10\dy15\hr17\min35}{\printim\yr1995\mo6\dy5\hr14\min2}{\version7}{\edmins55}{\nofpages2}{\nofwords340}{\nofchars1941}{\*\company Dell Computer Corporation}{\vern57443}} |
|
6 \widowctrl\ftnbj\aenddoc\formshade \fet0\sectd \linex0\headery709\footery709\colsx709\endnhere {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3 |
|
7 \pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}} |
|
8 {\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain |
|
9 \s1\ri-1050\sb240\sa60\keepn\widctlpar \b\f5\fs28\lang2057\kerning28 Font file format |
|
10 \par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 |
|
11 \par The font can be broken down into the following sections:- |
|
12 \par |
|
13 \par \pard \ri-1050\widctlpar {\f11 Signature |
|
14 \par Header info |
|
15 \par Character map |
|
16 \par Font metrics |
|
17 \par Font encoding |
|
18 \par }\pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Signature |
|
19 \par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 T.B.S, will be designed to fit in with a global Protea standard |
|
20 \par \pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Header Info |
|
21 \par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 {\f11 \{ |
|
22 \par WORD cell_height; |
|
23 \par WORD ascent; |
|
24 \par WORD descent; |
|
25 \par BYTE uline_pos; |
|
26 \par UBYTE uline_hgt; |
|
27 \par WORD section_count; |
|
28 \par UWORD flags; |
|
29 \par TEXT name[PRF_NAME_SIZE]; |
|
30 \par \} |
|
31 \par }\pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Character map |
|
32 \par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 List of {\f11 section_count} |
|
33 of following structure specifying sections of the character space that contain characters. (Note, it is assumed there will be very large empty sections so a solid block of characters with holes would be very inefficient). |
|
34 \par \pard \ri-1050\widctlpar\tx4395 {\f11 \{ |
|
35 \par WORD start; |
|
36 \par WORD end; |
|
37 \par \} |
|
38 \par }\pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Font metrics |
|
39 \par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 {\f11 \{ |
|
40 \par BYTE leftAdjust;\tab // Adjustment for left hand side of the character cell |
|
41 \par BYTE rightAdjust; // Adjustment for right hand side of the character cell |
|
42 \par WORD ascent;\tab // Ascent of top of character cell from print position |
|
43 \par WORD height;\tab // Height of character cell |
|
44 \par WORD move;\tab \tab // Amount to move the print position |
|
45 \par LONG offset;\tab // Offset of character encoding from start of encoding data |
|
46 \par \} |
|
47 \par }\pard\plain \s3\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Font encoding |
|
48 \par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 |
|
49 The font encoding is compacted together with no bit alignement within each character, although each character will start on a byte boundary. Each section of encoding is preceeded by a count that specifies either the numbe |
|
50 r of times the next line will repeat or the number of non-repeating lines to read before another count is encountered. The count is stored in 5 bits, if the first is set the count is a count of non-repeating lines following, if the bit is clear the count |
|
51 specifies the number of times to repeat the following line. |
|
52 \par \pard \ri-1050\widctlpar |
|
53 \par \pard\plain \s3\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Example of encoding. |
|
54 \par \pard\plain \ri-1049\keepn\widctlpar \f4\fs20\lang2057 {\f11\fs24 XXX.....XXX |
|
55 \par .X.......X. |
|
56 \par .X.......X. |
|
57 \par .X.......X. |
|
58 \par .XXXXXXXXX. |
|
59 \par .X.......X. |
|
60 \par .X.......X. |
|
61 \par .X.......X. |
|
62 \par XXX.....XXX |
|
63 \par }\pard \ri-1050\widctlpar {\f11\fs24 |
|
64 \par }\pard \ri-1050\widctlpar First count could either be specified as a repeat of 1 or 1 non-repeating scan line, followed by 11 bits of picture data ({\f11 XXX.....XXX} |
|
65 ). Then a repeat count of 3 followed the next 11 bits of picture data specifying the line to repeat ({\f11 .X.......X.}). Then again either a repeat of 1 or a non-repeat count of 1 followed by the picture data ({\f11 .XXXXXXXXX.} |
|
66 ). Another repeat of 3 and the picture data ({\f11 .X.......X.}), and a repeat of non-repeat count of 1 and the final line of picture data ({\f11 XXX.....XXX}). |
|
67 \par \pard \ri-1050\widctlpar The total storage space for this example would be 80 bits (10 bytes), .Made up of 5x5bits of count info + 5x11 bits of picture info. |
|
68 \par } |