home *** CD-ROM | disk | FTP | other *** search
- n,"Canon Bubble Jet 36x48 font with HP LaserJet Conversion";
- t:cn="(c) Copyright 1989, Bruce J. Patin, 01-24-89, 02-01-89";
- {this configuration file will only work with BitFont 5.1 and up}
-
- {initialize font parameters}
- a: aa=1; {allow adjacent dots}
- a: oo=0,"";{font orientation always portrait}
- a: bl=36,"";{baseline doesn't really matter, not used}
- a: fw=36,"";{font cell width always 36}
- a: fh=48,"";{font cell height always 48}
-
- {initialize character parameters}
- x: cc=0; {code}
- x: df=2,""; {data format always 2, wire matrix}
- x: pw=48,""; {print wires always 48, but actually no matter if df<>3}
- x: xd=1,""; {single horizontal density}
- x: yd=1,""; {single vertical density}
- x: or=0,""; {orientation always portrait}
- x: lo=0,""; {left offset must always be zero}
- x: to=36,"Baseline Indicator"; {used for baseline display only}
- x: cw=36,""; {character width always 36}
- x: ch=48,""; {character height always 48}
- {these two are Canon variables:}
- x: sp=0, "Starting Position (0<=sp<=35)";
- x: ep=36,"Ending Position (1<=ep<=36)";
-
- e; {end initialization section.}
-
- Ki1,"Load a Canon 36x48 font.";
- a: c1=0; {c1=0 for whole font, c1=1 for one character}
- L21; {starting point for loading single character}
- a: zz=0; {general use}
- a: zc=0; {current code in sequence}
- a: zl=0; {last code in sequence}
- a: nn=0; {nn is count of data bytes in sequence}
- a: zy=0; {zy = 0 says code sequence not found yet}
- {some re-initialization, in case parms were messed up by operator}
- a: aa=1; {allow adjacent dots}
- a: oo=0,"";{font orientation always portrait}
- a: fw=36,"";{font cell width always 36}
- a: fh=48,"";{font cell height always 48}
- x: df=2,""; {data format always 2, wire matrix}
- x: pw=48,""; {print wires always 48}
- x: or=0,""; {orientation always portrait}
- x: lo=0,""; {left offset must always be zero}
- x: cw=36,""; {character width always 36}
- x: ch=48,""; {character height always 48}
- {the above values will actually become effective when a G is executed}
- Z2:fs; {jump to label 2 if eof reached}
- #:fs,"Searching for code sequence. Filesize is ";
- L1; {search for code sequence}
- #:fp,"File position ";
- u:zz;
- j1:zz,ne,$1c;
- u:zz;
- j1:zz,ne,$43;
- u:zz;
- j1:zz,ne,$44;
- a:zy=1; {found a code sequence}
- ws:nn; {count, low byte first}
- u:zc; {first code of sequence}
- a:zl=nn-1/218-1+zc; {last code to load in this sequence}
- L4; {start of character}
- J1:zc,gt,zl; {if last code reached, go look for another sequence}
- j25:c1,eq,0; {skip next check if loading whole font}
- j22:zc,ne,c2; {if one character load, and not the one, go skip}
- L25;
- a: cc=zc; {code}
- $:zc,"Loading code (hex) ";
- u: sp; {at1, starting position}
- u: ep; {at2, ending position}
- g; {bit-map data}
- J24: c1,eq,1; {if was one character load, did it, go end it}
- L23; {return from skip by load character proc}
- a: zc=zc+1; {next code}
- j4; {end of character}
- L2; {end of file}
- j3:zy,eq,0;
- Ei1,2,0; {successful load, display code selection, delete 00 if not loaded.}
- L3; {no code sequence found}
- #R:**,"No code sequence found. Not a Canon 36x48 font. Hit return.";
- Ei1; {unsuccessful load}
-
- Ki2,"Load current character from a Canon font.";
- a: c1=1; {set for single character load}
- a: c2=cc; {one code to load}
- j21;
- L22; {here to skip a character if not the one wanted}
- $:zc,"Skipping code (hex) ";
- P,fp+218; {position file past character}
- J23; {go back for more}
- L24; {character loaded}
- ei2,1; {end and display design screen}
-
- ko1,"Save as a Canon 36x48 font.";
- a: p1=0; {p1=0 says saving font to file, p1=1 says downloading}
- L91; {here for downloading}
- #:**, "Finding first and last codes for data count calculation.";
- {starting to find first and last character codes}
- a:cc=0; {start with 0}
- c; {select first valid code}
- a:fc=cc; {save first code in fc}
- L 71; {loop to find last code}
- a:lc=cc; {set lc to last valid code selected}
- a:cc=cc+1; {increment to next possible code}
- c; {select next code}
- j 72:cc,gt,127; {stop if higher than decimal 127}
- j 71:cc,ne,0; {loop if haven't reached last valid code}
- L 72;
- a:nn=lc-fc+1*218+1; {calculate data count}
- u:$1c; {send font header}
- u:$43;
- u:$44;
- ws:nn;
- u:fc;
- a: zc=fc; {current code being sent}
- L11;
- c,zc; {select a code}
- j73:ee,eq,0; {if no error, was valid, skip over blank output}
- $:zc,"Sending blank for code (hex): ";
- u:0; {at1}
- u:36; {at2}
- u:0,216; {output 216 zeros}
- j12; {go do next code after blank}
- L73; {for skipping over blank output}
- $:cc,"Sending code (hex): ";
- {check to see that parms are still as required. If not, fix them.}
- j13:ch,ne,48;
- j13:cw,ne,36;
- j13:df,ne,2;
- j14; {ok so far}
- L13; {needs changing, use macro to do it}
- v,2,36,48,48; {sets format 2, width 36, height 48, wires 48}
- L14;
- j15:sp,lt,0;
- j15:sp,gt,35;
- j16;
- L15;
- a:sp=0; {set sp to zero if invalid}
- L16;
- j17:ep,lt,1;
- j17:ep,gt,36;
- j18;
- L17;
- j19:ep,gt,sp;
- a:ep=36;
- L19;
- a:ep=36-sp; {set ep to its max value if invalid}
- L18;
- u:sp;
- u:ep;
- g;
- L12; {increment to next code}
- a:zc=zc+1;
- J11:zc,le,lc; {go for more unless last code done}
- j92: p1,eq,1; {if downloading, go back to select downloaded font}
- eo1;
-
- kp; {download proc}
- a: p1=1; {set for download}
- j91; {go do it}
- L92; {downloaded, now select ram cg}
- u:27; {escape}
- u:37; { % }
- u:1;
- #:**,"Font downloaded, RAM CG selected.";
- ep; {finished and ram cg selected}
-
- Ki3,"Load an HP Font as Canon, resizing proportionately.";
- a: c1=0; {c1=0 for whole font, c1=1 for one character}
- a: c3=1; {c3=0 used to indicate unsuccessful load of one character}
- L51; {entry from single character load, with resizing}
- a:aw=30; a:ah=30; a:bw=36; a:bh=36; {resize parms}
- t:dm="nad"; {normalize, resize rel to b}
- L41; {here from font load, no resize}
- L61; {entry from single character load, no resizing}
- {initialize as necessary}
- a: zz=0; {general use}
- a: zc=0; {current code in sequence}
- a: zy=0; {zy = 0 says HP font descriptor sequence not found yet}
- a: aa=1; {allow adjacent dots}
- a: oo=0,"";{font orientation always portrait}
- #:fs,"Searching for HP font descriptor in file, size: ";
- L31; {start of search for font descriptor}
- #:fp,"File position: ";
- u:zz;
- J31: zz,ne,$1b; {look for esc}
- u: zz;
- j31: zz,ne,$29; {look for ) }
- u: zz;
- j31: zz,ne,$73; {look for s }
- a: zy=1; {found an HP Font descriptor}
- d: zl; {escape sequence main data length}
- u: zz; {throw away term char}
- w: fd; {font descriptor size}
- u: zz; {reserved}
- u: zz; {Font type}
- w: zz; {reserved}
- w: bl; {Baseline Distance (dots)}
- w: fw; {Cell Width (dots)}
- w: fh; {Cell Height (dots)}
- p:fp+fd-12; {skip to end of font descriptor}
- L32; {start search for code definition}
- j34: fp,gt,fs; {don't look for more if eof}
- u: zz;
- j32: zz,ne,$1b; {look for esc}
- u: zz;
- j32: zz,ne,$2a; {look for * }
- u: zz;
- j32: zz,ne,$63; {look for c }
- d: cc; {decimal code of character}
- u: zz; {throw away term char}
- L33; {search for character descriptor}
- u: zz;
- j 33: zz,ne,$1b; {look for esc}
- u: zz;
- j 33: zz,ne,$28; {look for ( }
- u: zz;
- j 33: zz,ne,$73; {look for c }
- d: zl; {length of character descriptor and data}
- j36:c1,eq,0; {skip next check if loading whole font}
- j36:cc,eq,c2; {skip next skip if its the one you want}
- $ : cc,"Skipping code (hex) ";
- p:fp+1+zl; {skip termchar, and length of descriptor and data}
- j32; {go look at next character}
- L36;
- $ : cc,"Loading code (hex) ";
- p:fp+5; {skip termchar, format, cont, size, class}
- u: or; {Character Orientation}
- u: zz; {reserved}
- i: lo; {left offset}
- i: to; {top offset}
- w: cw; {character width}
- w: ch; {character height}
- i: ep; {endpoint}
- a: ep=ep*bw/aw/4; {convert to Canon Ending Position}
- a: xl=zl-14-2; {bit-map data length}
- a: df=1;
- g:0,xl; {character data}
- $ : cc,"Converting code (hex) ";
- m; {execute macro to normalize and maybe resize}
- v,2,36,48,48; {sets format 2, width 36, height 48, wires 48}
- j 32:c1,eq,0; {go get another, unless you only wanted one}
- a:c3=1; {says got the character wanted}
- L34; {end of file}
- a:fw=36;
- a:fh=48;
- a:bl=bl*bh/ah;
- j35:zy,eq,0;
- j37:c3,eq,0;
- Ei3,2,0; {successful load, display code selection, delete 00 if not loaded.}
- Ei4,2,0; {successful load, display code selection, delete 00 if not loaded.}
- Ei5,1; {successful load, display design screen.}
- Ei6,1; {successful load, display design screen.}
- L35; {no code sequence found}
- #R:**,"No HP Font Descriptor found. Not an HP font. Hit return.";
- a:cc=c2; {to make sure original code and data are selected.}
- c:c2;
- Ei3; {unsuccessful load}
- Ei4; {unsuccessful load}
- L37; {can't find character}
- #R:**,"Current code not found in input file. Hit return.";
- a:cc=c2; {to make sure original code and data are selected.}
- c:c2;
- Ei5; {unsuccessful load}
- Ei6; {unsuccessful load}
-
- Ki4,"Load an HP Font as Canon, dot for dot.";
- a:aw=36; a:ah=48; a:bw=36; a:bh=48; {resize parms}
- t:dm="n"; {normalize only, no resize}
- a: c0=0; {c1=0 for whole font, c1=1 for one character}
- a: c3=1; {c3=0 used for single character load unsuccessful}
- j41;
-
- Ki5,"Load current character from HP font, resizing proportionately.";
- a:aw=36; a:ah=48; a:bw=36; a:bh=48; {resize parms}
- t:dm="nad"; {normalize, resize rel to b}
- a: c1=1; {c1=0 for whole font, c1=1 for one character}
- a: c2=cc;
- a: c3=0; {will be set to 1 if found code}
- j51;
-
- Ki6,"Load current character from HP font, dot for dot.";
- t:dm="n"; {normalize only, no resize}
- a: c1=1; {c1=0 for whole font, c1=1 for one character}
- a: c2=cc;
- a: c3=0; {will be set to 1 if found code}
- j61;
- .