home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / LASER / BFONT513.ZIP / PBRUSH.BFC < prev    next >
Encoding:
Text File  |  1989-01-28  |  4.5 KB  |  111 lines

  1. N,"PC Paintbrush FNT";
  2. t:cn="(c) Copyright 1988,1989 Bruce J. Patin 8/29/88, 01/23/89";
  3. { Notes on the use of this bfc file:
  4.     It is advisable only to use full font load and font save
  5.     functions (Function 1 on Bit Font 3.9 Load and Save screens),
  6.     otherwise the resulting file may not be useable.
  7.  
  8.     The BitFont character width (CW) variable is set equal to
  9.     the font cell width (FW).  This assumes that the data for each
  10.     character bit map includes the maximum character cell defined
  11.     in the first two bytes of the PC Paintbrush FNT file.
  12.     If a smaller proportional width is desired, alter the WW variable
  13.     listed as WW-Proportional width of the BitFont Character Parameters.
  14.     If the above assumption is incorrect, change all ww variables in this
  15.     bfc file to cw before using the CF function of BitFont.
  16.  
  17.     This bfc file should be used with BitFont 3.9 or later.
  18.     If used with BitFont 3.8, character 00 will be deleted on a load,
  19.     and stored as zeros on a save.
  20. }
  21.   x: df=1;      {init data format to 1}
  22.   x: xd=1;      {single horizontal density}
  23.   x: yd=1;      {one pass, normal vertical density}
  24.   x: to=0;      {top offset, arbitrary}
  25.   x: lo=0;      {left offset, zero}
  26.   x: ww=0,"Proportional width";  {character width, not used for bit string calculation}
  27.   a: aa=1;      {allow adjacent dots}
  28.   a: bl=0;      {baseline distance, arbitrary}
  29. E; {end initialization section.}
  30. KI; {start input font header.}
  31.   u: z1;         {font cell width + 0ah}
  32.   a: fw=z1-$a0;  {font cell width}
  33.   u: fh;         {font cell height}
  34.   a: ch=fh;      {char height = font cell height}
  35.   a: cw=fw;      {char width = font cell width}
  36.   a: cc=0;       {start at code 0}
  37.   a: z2=fw+7/8;  {calc num of bytes wide of each char}
  38.   a: zl=fh*z2;   {bytes per character bit map}
  39.   a: zw=2;       {initial value of file position of width data}
  40.   a: zm=258;     {initial value of file position of bit map data}
  41.   a: zf=1;       {flag to indicate first character}
  42. EI; {end input font header.}
  43. L 8; {start of sequential locate to next char}
  44. j 1: zf,eq,1;  {skip updates if first character (00)}
  45.   a: zw=zw+1;  {update pointer to next width byte}
  46.   a: zm=zm+zl; {update pointer to next bit map}
  47.   a: cc=cc+1;  {update code to next char}
  48. L 1; {label 1 to indicate start of character upload.}
  49. $ : cc,"Loading code (hex) ";
  50.   a: zf=0; {turn off first char flag}
  51.   p: zw;   {position file to character width byte}
  52.   u: ww;   {character width}
  53.   p: zm;   {position file to character bit map}
  54.   g; {character data}
  55. ESL; {end character search, character loaded.}
  56.   j 8:cc,ne,$ff; {go get next char}
  57. #:**,"Font loaded.";
  58. ET; {end input font.}
  59. KS; {start locate to an input character.}
  60.   a: z2=fw+7/8;  {calc num of bytes wide of each char}
  61.   a: zl=fh*z2;   {bytes per character bit map}
  62.   a: zw=cc+2;    {initial value of file position of width data}
  63.   a: zm=cc*zl+258; {initial value of file postion of bit map data}
  64.   a: zf=1;       {flag to indicate first character}
  65.   j 1: 1,eq,1;   {located, go get it}
  66. ESU; {end character search program (unsuccessful search)}
  67. KO; {start output font header.}
  68. #:**, "Saving Font Header ";
  69.   u:fw+$a0; {font cell width}
  70.   u:fh;     {font cell height}
  71.   a:zc=0;   {start with first char}
  72. L 9;  {start loop to save width data}
  73.   a:cc=zc;
  74.   c;        {select char in memory}
  75. $ :zc,"Saving width for code (hex): ";
  76. j 5: zc,eq,cc; {skip next zero default save data if code is valid}
  77.   u:0;      {default zero character width}
  78. j 35:1,eq,1;
  79. L 5;
  80.   u:ww;     {character width}
  81. L 35;
  82.   a:zc=zc+1;  {update to next char code}
  83. j 9:zc,ne,256; {loop if not last code done}
  84. EO; {end output font header.}
  85.   a: z2=fw+7/8;  {calc num of bytes wide of each char}
  86.   a: zl=fh*z2;   {bytes per character bit map}
  87.   a:zc=0;   {start with first char}
  88. L 10;  {start loop to save bit map data}
  89. KC; {start output character.}
  90.   a:cc=zc;
  91.   c;        {select char in memory}
  92. $ :zc,"Saving bit map for code (hex): ";
  93. j 15: zc,eq,cc; {skip next zero default save data if code is valid}
  94.   a: z3=zl;      {bytes per character bit map}
  95. L 55;
  96.   u:0;      {default zero bit map data}
  97.   a:z3=z3-1;
  98. j 55:z3,ne,0; {do it for length of bit map data}
  99. j 45:1,eq,1;
  100. L 15;
  101.   g;        {save character bit map data}
  102. L 45;
  103. EC; {end output character.}
  104.   a:zc=zc+1;  {update to next char code}
  105. j 10:zc,ne,256; {loop if not done}
  106. EZ; {end output font.}
  107. KP; {start download}
  108. # :**,"This font is not designed to be downloaded to a printer";
  109. EP; {end download}
  110. .
  111.