diff -r 000000000000 -r 5d03bc08d59c graphicsdeviceinterface/bitgdi/Documentation/FONTFILE.rtf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphicsdeviceinterface/bitgdi/Documentation/FONTFILE.rtf Tue Feb 02 01:47:50 2010 +0200 @@ -0,0 +1,68 @@ +{\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; +\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; +\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 +\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} +{\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}} +\widowctrl\ftnbj\aenddoc\formshade \fet0\sectd \linex0\headery709\footery709\colsx709\endnhere {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3 +\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 )}} +{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain +\s1\ri-1050\sb240\sa60\keepn\widctlpar \b\f5\fs28\lang2057\kerning28 Font file format +\par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 +\par The font can be broken down into the following sections:- +\par +\par \pard \ri-1050\widctlpar {\f11 Signature +\par Header info +\par Character map +\par Font metrics +\par Font encoding +\par }\pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Signature +\par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 T.B.S, will be designed to fit in with a global Protea standard +\par \pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Header Info +\par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 {\f11 \{ +\par WORD cell_height; +\par WORD ascent; +\par WORD descent; +\par BYTE uline_pos; +\par UBYTE uline_hgt; +\par WORD section_count; +\par UWORD flags; +\par TEXT name[PRF_NAME_SIZE]; +\par \} +\par }\pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Character map +\par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 List of {\f11 section_count} + 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). +\par \pard \ri-1050\widctlpar\tx4395 {\f11 \{ +\par WORD start; +\par WORD end; +\par \} +\par }\pard\plain \s3\ri-1050\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Font metrics +\par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 {\f11 \{ +\par BYTE leftAdjust;\tab // Adjustment for left hand side of the character cell +\par BYTE rightAdjust; // Adjustment for right hand side of the character cell +\par WORD ascent;\tab // Ascent of top of character cell from print position +\par WORD height;\tab // Height of character cell +\par WORD move;\tab \tab // Amount to move the print position +\par LONG offset;\tab // Offset of character encoding from start of encoding data +\par \} +\par }\pard\plain \s3\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Font encoding +\par \pard\plain \ri-1050\widctlpar \f4\fs20\lang2057 +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 +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 +specifies the number of times to repeat the following line. +\par \pard \ri-1050\widctlpar +\par \pard\plain \s3\sb240\sa60\keepn\widctlpar \b\f4\lang2057 Example of encoding. +\par \pard\plain \ri-1049\keepn\widctlpar \f4\fs20\lang2057 {\f11\fs24 XXX.....XXX +\par .X.......X. +\par .X.......X. +\par .X.......X. +\par .XXXXXXXXX. +\par .X.......X. +\par .X.......X. +\par .X.......X. +\par XXX.....XXX +\par }\pard \ri-1050\widctlpar {\f11\fs24 +\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} +). 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.} +). 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}). +\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. +\par } \ No newline at end of file