home *** CD-ROM | disk | FTP | other *** search
- N,"PC Paintbrush FNT";
- t:cn="(c) Copyright 1988,1989 Bruce J. Patin 8/29/88, 01/23/89";
- { Notes on the use of this bfc file:
- It is advisable only to use full font load and font save
- functions (Function 1 on Bit Font 3.9 Load and Save screens),
- otherwise the resulting file may not be useable.
-
- The BitFont character width (CW) variable is set equal to
- the font cell width (FW). This assumes that the data for each
- character bit map includes the maximum character cell defined
- in the first two bytes of the PC Paintbrush FNT file.
- If a smaller proportional width is desired, alter the WW variable
- listed as WW-Proportional width of the BitFont Character Parameters.
- If the above assumption is incorrect, change all ww variables in this
- bfc file to cw before using the CF function of BitFont.
-
- This bfc file should be used with BitFont 3.9 or later.
- If used with BitFont 3.8, character 00 will be deleted on a load,
- and stored as zeros on a save.
- }
- x: df=1; {init data format to 1}
- x: xd=1; {single horizontal density}
- x: yd=1; {one pass, normal vertical density}
- x: to=0; {top offset, arbitrary}
- x: lo=0; {left offset, zero}
- x: ww=0,"Proportional width"; {character width, not used for bit string calculation}
- a: aa=1; {allow adjacent dots}
- a: bl=0; {baseline distance, arbitrary}
- E; {end initialization section.}
- KI; {start input font header.}
- u: z1; {font cell width + 0ah}
- a: fw=z1-$a0; {font cell width}
- u: fh; {font cell height}
- a: ch=fh; {char height = font cell height}
- a: cw=fw; {char width = font cell width}
- a: cc=0; {start at code 0}
- a: z2=fw+7/8; {calc num of bytes wide of each char}
- a: zl=fh*z2; {bytes per character bit map}
- a: zw=2; {initial value of file position of width data}
- a: zm=258; {initial value of file position of bit map data}
- a: zf=1; {flag to indicate first character}
- EI; {end input font header.}
- L 8; {start of sequential locate to next char}
- j 1: zf,eq,1; {skip updates if first character (00)}
- a: zw=zw+1; {update pointer to next width byte}
- a: zm=zm+zl; {update pointer to next bit map}
- a: cc=cc+1; {update code to next char}
- L 1; {label 1 to indicate start of character upload.}
- $ : cc,"Loading code (hex) ";
- a: zf=0; {turn off first char flag}
- p: zw; {position file to character width byte}
- u: ww; {character width}
- p: zm; {position file to character bit map}
- g; {character data}
- ESL; {end character search, character loaded.}
- j 8:cc,ne,$ff; {go get next char}
- #:**,"Font loaded.";
- ET; {end input font.}
- KS; {start locate to an input character.}
- a: z2=fw+7/8; {calc num of bytes wide of each char}
- a: zl=fh*z2; {bytes per character bit map}
- a: zw=cc+2; {initial value of file position of width data}
- a: zm=cc*zl+258; {initial value of file postion of bit map data}
- a: zf=1; {flag to indicate first character}
- j 1: 1,eq,1; {located, go get it}
- ESU; {end character search program (unsuccessful search)}
- KO; {start output font header.}
- #:**, "Saving Font Header ";
- u:fw+$a0; {font cell width}
- u:fh; {font cell height}
- a:zc=0; {start with first char}
- L 9; {start loop to save width data}
- a:cc=zc;
- c; {select char in memory}
- $ :zc,"Saving width for code (hex): ";
- j 5: zc,eq,cc; {skip next zero default save data if code is valid}
- u:0; {default zero character width}
- j 35:1,eq,1;
- L 5;
- u:ww; {character width}
- L 35;
- a:zc=zc+1; {update to next char code}
- j 9:zc,ne,256; {loop if not last code done}
- EO; {end output font header.}
- a: z2=fw+7/8; {calc num of bytes wide of each char}
- a: zl=fh*z2; {bytes per character bit map}
- a:zc=0; {start with first char}
- L 10; {start loop to save bit map data}
- KC; {start output character.}
- a:cc=zc;
- c; {select char in memory}
- $ :zc,"Saving bit map for code (hex): ";
- j 15: zc,eq,cc; {skip next zero default save data if code is valid}
- a: z3=zl; {bytes per character bit map}
- L 55;
- u:0; {default zero bit map data}
- a:z3=z3-1;
- j 55:z3,ne,0; {do it for length of bit map data}
- j 45:1,eq,1;
- L 15;
- g; {save character bit map data}
- L 45;
- EC; {end output character.}
- a:zc=zc+1; {update to next char code}
- j 10:zc,ne,256; {loop if not done}
- EZ; {end output font.}
- KP; {start download}
- # :**,"This font is not designed to be downloaded to a printer";
- EP; {end download}
- .