&dA &dA &d@ Automatic font downloading program for LaserJet II, etc &dA &d@ printers, for the purpose of printing music and other &dA &d@ documents that use the CCARH mothods of printing. &dA &dA &d@ This program makes use of fonts stored in the library &dA &d@ C:\MUSPRINT\FONTS &dA &dA &d@ (rev 01/08/93) &dA &dA &d@ &dA03-05-96&d@ Add feature that if the last parameter in line 1 is &dA &d@ a 1, then use the "thinning" algorithm to reduce some &dA &d@ of the blackness of the characters. &dA str out.240,esc.1,line.240,data.240(200),file.80 str lib.80 str fname.30(20) int cnt,cnum,cwid,cvoff,cdeltax,corient,cloff int a,b,c,d,w,bw,e,f,g int h,i,j,k,n,m int p,fnum(20),q int v int thin esc = chr(27) lib = "C:\MUSPRINT\FONTS\" putc putc MULTIPLE FONT DOWN-LOADING PROGRAM putc p = 15 fnum(1) = 31 fnum(2) = 32 fnum(3) = 33 fnum(4) = 34 fnum(5) = 37 fnum(6) = 38 fnum(7) = 39 fnum(8) = 44 fnum(9) = 46 fnum(10) = 14 fnum(11) = 106 fnum(12) = 108 fnum(13) = 300 fnum(14) = 400 fnum(15) = 320 fname(1) = "xfonts\tr08s" fname(2) = "xfonts\tr08b" fname(3) = "xfonts\tr08i" fname(4) = "xfonts\tr09s" fname(5) = "xfonts\tr10s" fname(6) = "xfonts\tr10b" fname(7) = "xfonts\tr10i" fname(8) = "xfonts\tr12b" fname(9) = "xfonts\tr14s" fname(10) = "mfonts\note14t" fname(11) = "mfonts\beam6" fname(12) = "mfonts\beam8" fname(13) = "mfonts\ties" fname(14) = "mfonts\wedges" fname(15) = "mfonts\brackets" loop for q = 1 to p putc putc Downloading loading font number ~fnum(q) putc file = lib // fname(q) n = fnum(q) open [1,1] file thin = 0 getf [1] a b c d e f g h i j k m thin out = esc // "*c" // chs(n) // "D" out = out // esc // ")s26W" // ch2(26) // ch2(a) out = out // ch2(0) // ch2(b) // ch2(c) // ch2(d) // chr(e) out = out // chr(f) // ch2(g) // ch2(h) // ch2(i) // ch2(0) out = out // ch2(j) // chr(k) // chr(m) putp ~out ... cnt = 0 A: getf [1] line .t2 a b c d e f g line = trm(line) line = line // pad(1) if line{1} = "#" or line{1} = "$" putc ~a ... if cnt > 0 perform download end cnum = a cwid = e cvoff = d cdeltax = g corient = b cloff = c cnt = 0 v = v + 1 if v = 16 v = 0 putc end if line{1} = "$" goto B end goto A end cnt = cnt + 1 if thin = 1 data(cnt) = line // pad(240) else data(cnt) = line end goto A eof1: perform download B: close [1] putc repeat stop * procedure download int j,k if thin = 1 loop for j = 2 to cnt - 2 loop for k = 1 to 237 if data(j-1){k,4} = "xxxx" if data(j){k,4} = "xxxx" if data(j+1){k,4} = "xxxx" if data(j+2){k,4} = "xxxx" data(j){k,4} = "x x" data(j+1){k,4} = "xx x" end end end end repeat repeat end bw = cwid + 7 / 8 w = bw * 8 i = bw * cnt + 16 out = esc // "*c" // chs(cnum) // "E" // esc // "(s" out = out // chs(i) // "W" // ch2(1024) // chr(14) out = out // chr(1) // chr(corient) // chr(0) out = out // ch2(cloff) // ch2(cvoff) out = out // ch2(w) // ch2(cnt) // ch2(cdeltax) loop for i = 1 to cnt line = data(i) // pad(w) k = 1 n = 0 loop for j = 1 to w n = n << 1 if line{j} = "x" n = n + 1 end if k = 8 out = out // chr(n) k = 1 n = 0 else k = k + 1 end repeat if len(out) > 100 putp ~out ... out = "" end repeat putp ~out ... return * run