home *** CD-ROM | disk | FTP | other *** search
- %!PS-Adobe-1.0
- % Postscript Initialization Prologue
- % Copyright SoftWorks Development, 1990
- % All Rights Reserved
- % Version 1.00
-
- /GVstate save def % save original state
- /GVdict 75 dict def % create dictionary with a name
- GVdict begin % push it on the stack, make it current
-
- % Constants
- /linespace 12 def
- /leftmargin 0 def
- /supoffset {fontsize .3 mul} def
- /suboffset {fontsize .3 mul neg} def
- /underlinewidth {fontsize 24 div} def
- /underlinepos {underlinewidth 2 mul} def
- /toppage 792 def
-
- % Shortcuts
- /bd {bind def} bind def
-
- % Do foreign language encoding
- /MyEncoding StandardEncoding 256 array copy def % init MyEncoding
- MyEncoding 127 [/.notdef /Ccedilla /udieresis /eacute /acircumflex /adieresis
- /agrave /aring /ccedilla /ecircumflex /edieresis /egrave /idieresis
- /icircumflex /igrave /Adieresis /Aring /Eacute /ae /AE /ocircumflex
- /odieresis /ograve /ucircumflex /ugrave /ydieresis /Odieresis /Udieresis
- /cent /sterling /yen /.notdef /florin /aacute /iacute /oacute /uacute
- /ntilde /Ntilde /ordfeminine /ordmasculine /questiondown /.notdef
- /.notdef /.notdef /.notdef /exclamdown /guillemotleft /guillemotright
- % 176
- /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
- % 186
- /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
- % 196
- /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
- % 206
- /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
- % 216
- /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
- % 224
- /a /germandbls /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
- /.notdef /.notdef /.notdef /.notdef /.notdef
- % 237
- /oslash /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
- /.notdef /.notdef /.notdef
- % 248
- /ring /periodcentered /periodcentered /.notdef /.notdef /.notdef
- % 254
- /bullet /.notdef
- ] putinterval
- MyEncoding 20 [ /paragraph /section ] putinterval
-
- /MakeForeignFont % P:/newfontname /oldfontname, R:nothing
- {
- % ** first find out if it's known **
- FontDirectory % get a directory: /newname, /oldfontname, directorydict
- 1 index % make copy of /oldfontname: /newname, /oldfontname, dict, /oldfontname
- known % is /oldfontname present: /newname, /oldfontname, boolean
- FontDirectory % another directory:/newname, /oldfontname, boolean, directorydict
- 3 index % make copy of /newfontname: /newname, /oldfontname, boolean, directorydict, /newfontname
- known not % is /newfontname already present: /newname, /oldfontname, boolean, boolean
- and % /newfontname, /oldfontname, boolean
- {mf} {pop pop} ifelse
- } bd
-
- /mf
- {
- findfont % get the old dict: /newname, olddict
- dup length % get it's length: /newname, olddict length
- dict % make a blank dict: /newname, olddict newdict
- exch % swap them: /newname, newdict, olddict
- {cycledict} forall % cycle thru olddict: /newname, newdict
- definefont pop
- } bd
-
- /cycledict
- {
- 1 index /FID eq {pop pop} {checkencoding} ifelse
- } bd
-
- /checkencoding
- {
- 1 index /Encoding eq {pop MyEncoding} if % if /Encoding, swap to MyEncoding
- 2 index 3 1 roll put %
- } bd
-
- % Do the foreign encoding now
- /InitForeign % P:nothing, R:nothing
- {
- /Courier-SW /Courier MakeForeignFont
- /Courier-Bold-SW /Courier-Bold MakeForeignFont
- /Courier-Oblique-SW /Courier-Oblique MakeForeignFont
- /Courier-BoldOblique-SW /Courier-BoldOblique MakeForeignFont
- /Times-Roman-SW /Times-Roman MakeForeignFont
- /Times-Bold-SW /Times-Bold MakeForeignFont
- /Times-Italic-SW /Times-Italic MakeForeignFont
- /Times-BoldItalic-SW /Times-BoldItalic MakeForeignFont
- /Helvetica-SW /Helvetica MakeForeignFont
- /Helvetica-Bold-SW /Helvetica-Bold MakeForeignFont
- /Helvetica-Oblique-SW /Helvetica-Oblique MakeForeignFont
- /Helvetica-BoldOblique-SW /Helvetica-BoldOblique MakeForeignFont
- } bd
-
- % State Variables
- /boldface false def
- /underline false def
- /subscript false def
- /superscript false def
- /italics false def
- /fontsize 12 def
-
- % Procedures
- /cpx {currentfont /FontMatrix get 0 get 1000 mul} def % get x scaling for current font
- /cpy {currentfont /FontMatrix get 3 get 1000 mul} def % get x scaling for current font
- /supon {/superscript true def} def
- /supoff {/superscript false def} def
- /subon {/subscript true def} def
- /suboff {/subscript false def} def
- /boldon {/boldface true def} def
- /boldoff {/boldface false def} def
- /undon {/underline true def} def
- /undoff {/underline false def} def
- /italon {/italics true def} def
- /italoff {/italics false def} def
- /currenty {currentpoint exch pop} def
- /currentx {currentpoint pop} def
- /nl {leftmargin currenty linespace sub moveto} def
- /nl2 {leftmargin currenty linespace 2 div sub moveto} def
- /np {save showpage restore newpath 0 toppage moveto} def
- /m % P:720ths of an inch, R:nothing
- {
- 10.0 div % convert to 72ths of an inch
- underline {dup showunderline} if % underline spaces too
- 0 rmoveto % move
- } def
- /nf % P:fontname, size on stack, R:nothing
- {
- exch % get fontname to bottom
- findfont % find this font
- exch % get size to bottom
- scalefont
- setfont
- } def
- /initpath {currentpoint newpath moveto} def
- /init {InitForeign /Courier-SW 12 nf newpath} def
- /underlinestring % P:string on stack, R:string still on stack
- {
- dup stringwidth pop showunderline
- } def
- /showunderline % P:length on stack, R:nothing, currentpoint unchanged
- {
- currentpoint % original x,y
- 3 -1 roll % push x,y up, bring length to bottom
- 0 underlinepos neg rmoveto % move to underline position
- initpath % clear path for stroke
- 0 rlineto % draw the line
- underlinewidth setlinewidth % set width of underline
- stroke % paint the underline
- moveto % restore currentpoint
- } def
- /boldstring % P:string on stack, R:string on stack
- {
- dup
- gsave
- cpx .05 mul 0 rmoveto
- show
- grestore
- } def
- /setitalics % P:string on stack, R:string on stack
- {
- gsave
- currentfont[1 0 .3 1 0 0] makefont setfont
- } def
- /clearitalics
- {
- currentpoint
- grestore
- moveto
- } def
- %/s {show} def
- /s
- {
- currenty exch % put currenty above string on the stack
- underline {underlinestring} if
- superscript {0 supoffset rmoveto} if
- subscript {0 suboffset rmoveto} if
- italics {setitalics} if
- boldface {boldstring} if
- show
- italics {clearitalics} if
- currentx exch moveto % put currentx on stack, swap x,y, moveto original position
- } def
-
- init