home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
prinkb18.zip
/
printkb.psh
< prev
next >
Wrap
Text File
|
1995-04-25
|
6KB
|
155 lines
%%BeginProcSet: printkb 1.4 0
% printkb (C) Copyright IBM Corp. 1994, 1995
/PrintKb 120 dict def
PrintKb begin
/bd {bind def} bind def
/ar .7 def % rounded corner size
/sw .34 def % size of shadow
/adj .4 def % size adjust for key size
/hadj 0 def % name adjustment for scancodes
/f {setfont} bd
/gs {gsave} bd /gr {grestore} bd
/cp {currentpoint translate} bd
/m {moveto} bd /rm {rmoveto} bd
/sm {sw sw translate} bd
/lw {.07 setlinewidth} bd /lt {lineto} bd
/a {ar arcto pop pop pop pop} bd /r {rlineto} bd
/setsize {100 div dup scale} bd
% Define key outlines
/keystart {
gs lw cp 1 eq {.96}{1} ifelse /gray exch def
/y exch adj add def /x exch adj add def
/y2 y 2 div def /x2 x 2 div def
} bd
/keybody { 0 y2 m 0 y x2 y a x y x y2 a x 0 x2 0 a 0 0 0 y2 a closepath } bd
/keyend { gs gray setgray fill gr 0 setgray stroke gr } bd
/key {
keystart
sw 0 ne {
0 setgray keybody fill sm
} if
keybody keyend
} bd
/keye {
keystart
/dy exch adj add def /dx exch adj add def
/y3 dy 2 div def /y4 y dy sub 2 div dy add def
/x3 dx 2 div def /x4 x dx sub 2 div dx add def
sw 0 ne {
0 setgray keybodye fill sm
} if
keybodye keyend
} bd
/keybodye {
0 y3 m 0 dy x3 dy a dx dy dx y4 a dx y x4 y a x y x y2 a
x 0 x2 0 a 0 0 0 y2 a closepath
} bd
%/capslock {BS smallf f 0 .45 neg m (\240) ES} bd
/capslock {BS 1 setgray 0 1 r 1 0 r 0 -1 r closepath fill gr} bd
/BS {gs cp sm} def
/ES {show gr} def
/scan {BS f cvx exec gs show gr 100 div exch 100 div exch rm ES} bd
/scan0 {BS smallf f m0 ES} bd
/scan1 {BS smallf f m1 ES} bd
/scan2 {BS smallf f m2 ES} bd
/scan3 {BS smallf f m3 ES} bd
/scan4 {BS bigf f m4 ES} bd
/dkey0 {BS smallf f m0 dkey ES} bd
/dkey1 {BS smallf f m1 dkey ES} bd
/dkey2 {BS smallf f m2 dkey ES} bd
/dkey3 {BS smallf f m3 dkey ES} bd
/dkey4 {BS bigf f m4 dkeyb ES} bd
/m0 {0.8 0.7 m} bd
/m1 {0.8 3.0 m} bd
/m2 {3.1 0.7 m} bd
/m3 {3.1 3.0 m} bd
/m4 {0.7 2.2 m} bd
/m5 {0 0 m} bd
/dkey {gs .90 setgray 0 1 r .8 0 r 0 -1 r closepath fill gr} bd
/dkeyb {gs .90 setgray 0 1.3 r 1 0 r 0 -1.3 r closepath fill gr} bd
/scanhex { BS hexf f .8 1.5 m ES} bd
/scanhex2 { BS littlef f 3.2 3.4 m ES} bd
/scanname { BS namef f .7 2 hadj sub m ES} bd
/scanname1 { BS namef1 f .5 2 hadj sub m ES} bd
/rjpos [45 90 135 180 225 270] def
/rjname {currentpoint /NameY exch def /NameX exch def rjfont f show} bd
/rjsyn {NameX rjpos 0 get add NameY m rjfont f show} bd
/rjhex {rjfont2 f show} bd
/rjm {rjpos exch get NameX add NameY m} bd
/geti {currentfile exch readhexstring pop} bd
% image character
% <incr> <x-move> <y-move> <widebytes> <high> <kind> ic
/ic {
icwide exch get /Cm exch def
/Cy exch def /Cx exch def /Cb exch def /Cl exch def /Ci exch def
/Cz Cx 8 mul def
Cx Cy mul string /Im exch def Im geti pop
gs Cl Cm div Cb Cm div rm cp Cz Cm div Cy Cm div scale
Cz Cy true [Cz 0 0 Cy neg 0 Cy] {Im} imagemask gr
Ci Cm div 0 rmoveto
} bd
/icwide [21 21 21 21 16 4] def
% font related items
/cp819 [
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
/parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
/zero/one/two/three/four/five/six/seven
/eight/nine/colon/semicolon/less/equal/greater/question
/at/A/B/C/D/E/F/G
/H/I/J/K/L/M/N/O
/P/Q/R/S/T/U/V/W
/X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
/grave/a/b/c/d/e/f/g
/h/i/j/k/l/m/n/o
/p/q/r/s/t/u/v/w
/x/y/z/braceleft/bar/braceright/asciitilde/.notdef
/florin/dotlessi/trademark/lslash/Lslash/oe/OE/dagger
/daggerdbl/bullet1/breve/caron/ogonek/hungarumlaut/dotaccent/Eth
/quotedblleft/quotedblright/scaron/Scaron/zcaron/Zcaron/circumflex/tilde
/ring/quoteleft/quoteright/quotedblbase/perthousand/emdash/.notdef/.notdef
/bullet/exclamdown/cent/sterling/currency/yen/brokenbar/section
/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
] def
/recode {
/encode exch def
dup maxlength dict /nf exch def
{ 1 index /FID ne 2 index /Encoding ne and
{nf 3 1 roll put} {pop pop} ifelse
} forall
nf /Encoding encode put Nfn nf definefont
} bd
/Nfn /Helvetica def
/Helvetica findfont cp819 recode /nfont exch def
/Nfn /Helvetica-Bold def
/Helvetica-Bold findfont cp819 recode /bfont exch def
/namef nfont 2 scalefont def
/namef1 nfont 1.8 scalefont def
/hexf nfont 3 scalefont def
/bigf nfont 3 scalefont def
/smallf bfont 2.2 scalefont def
/littlef nfont 1.5 scalefont def
/rjfont nfont 10 scalefont def
/rjfont2 /Courier-Bold findfont [5 0 0 9 0 0] makefont def
/symbf /Symbol findfont 3 scalefont def
/symsf /Symbol findfont 2.2 scalefont def
end
%%EndProcSet