home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Education Sampler 1992 [NeXTSTEP]
/
Education_1992_Sampler.iso
/
Demos
/
DE_FrameMaker
/
FrameMaker.app
/
fminit2.0
/
next
/
makerprint.ps
< prev
next >
Wrap
Text File
|
1992-08-24
|
18KB
|
742 lines
%-
%- FrameMaker Postscript Prolog 3.0, for use with FrameMaker 3.0
%- Copyright (c) 1986, 87, 88, 89, 90, 91 by Frame Technology, Inc.
%- All rights reserved.
%-
%-
/landscape false def
/t300 [
0.000 0.006 0.011 0.017 0.022 0.028 0.033 0.039
0.045 0.050 0.056 0.061 0.067 0.073 0.078 0.084
0.089 0.095 0.101 0.117 0.133 0.148 0.164 0.179
0.195 0.210 0.225 0.240 0.255 0.270 0.285 0.299
0.314 0.329 0.344 0.359 0.374 0.389 0.404 0.419
0.435 0.451 0.466 0.482 0.498 0.513 0.529 0.544
0.560 0.576 0.591 0.610 0.632 0.654 0.677 0.699
0.721 0.744 0.766 0.788 0.821 0.866 0.911 0.955
1.000
] def
/t400 [
0.000 0.003 0.006 0.009 0.012 0.014 0.017 0.020
0.023 0.026 0.029 0.032 0.035 0.038 0.041 0.043
0.046 0.049 0.056 0.063 0.071 0.079 0.087 0.095
0.104 0.117 0.130 0.143 0.157 0.173 0.189 0.205
0.225 0.245 0.259 0.272 0.285 0.298 0.314 0.329
0.345 0.361 0.376 0.392 0.407 0.423 0.439 0.454
0.470 0.486 0.502 0.528 0.554 0.580 0.605 0.628
0.650 0.672 0.695 0.727 0.762 0.796 0.857 0.922
1.000
] def
/tlinear [
0.000 0.016 0.031 0.047 0.062 0.078 0.094 0.109
0.125 0.141 0.156 0.172 0.188 0.203 0.219 0.234
0.250 0.266 0.281 0.297 0.312 0.328 0.344 0.359
0.375 0.391 0.406 0.422 0.438 0.453 0.469 0.484
0.500 0.516 0.531 0.547 0.562 0.578 0.594 0.609
0.625 0.641 0.656 0.672 0.688 0.703 0.719 0.734
0.750 0.766 0.781 0.797 0.812 0.828 0.844 0.859
0.875 0.891 0.906 0.922 0.938 0.953 0.969 0.984
1.000
] def
/orgmatrix matrix def
/savematrix {
orgmatrix currentmatrix pop
} bind def
/restorematrix {
orgmatrix setmatrix
} bind def
/dmatrix matrix def
/desiredpat 0 def
/dpi 72 0 dmatrix defaultmatrix dtransform
dup mul exch dup mul add sqrt round
def
/freq dpi 18.75 div 8 div round dup 0 eq { pop 1 } if 8 mul dpi exch div def
/sangle 1 0 dmatrix defaultmatrix dtransform exch atan def
/graymode true def
/pats 16 array def
/mymatrix matrix def
/savedgray 0 def
/F /fill load def
/rc /rectclip load def
/GS /gsave load def
/GR /grestore load def
/SL /setlinewidth load def
/SC /setlinecap load def
/CS { closepath S } bind def
/A /strokepath load def
/TR /translate load def
/L /lineto load def
/M /moveto load def
/D /curveto load def
/C /closepath load def
/T { moveto show } bind def
/smat { mymatrix currentmatrix pop } bind def
/rmat { mymatrix setmatrix } bind def
/sp { P exch get exec } bind def
systemdict /setshared known
{ 300 dpi eq { /tran t300 def } { /tran t400 def } ifelse }
{ /tran tlinear def }
ifelse
systemdict /xshow known not {
/xhow {
/pts exch def
/str exch def
0 1 str length 1 sub {
currentpoint 3 -1 roll str 1 index 1 getinterval show
3 1 roll moveto
pts exch get 0 rmoveto
} for
} bind def
} {
/xhow {
checkink xshow
} bind def
} ifelse
systemdict /xyshow known not {
/xyhow {
/pts exch def
/str exch def
0 1 str length 1 sub {
currentpoint 3 -1 roll str 1 index 1 getinterval show
3 1 roll moveto 2 mul
pts 1 index get pts 3 -1 roll 1 add get rmoveto
} for
} bind def
} {
/xyhow {
checkink xyshow
} bind def
} ifelse
% close clipping down to this rectangle
% must be outside FrameDict
/CR { % x y w h
% 4 copy errfile 5 1 roll (% % % % CR\n) fprintf
% initclip
% rectclip
initclip
newpath
4 2 roll M dup 0 exch rlineto exch 0 rlineto 0 exch neg rlineto
C clip newpath
} bind def
%
% XXX HACK -- These must live outside FrameDict, which is only active
% when we are printing a page.
%
/makecontextpattern { % data name index
exch pop
[null 8 1 /setpattern cvx] 4 array copy dup % name data index array array
0 5 -1 roll put cvx % name index array
pats 3 1 roll put
} def
%
% Array of procedures which set the desired pattern number
% when executed.
%
/P [ 0 1 15 { [ /desiredpat 3 -1 roll /store cvx ] cvx } for ] def
/patoffsetx 0 def
/patoffsety 0 def
/currentpat null def
/FrameDict 250 dict def % declare FrameDict
%
% Called at beginning of page.
% Push FrameDict onto dictionary stack.
%
/FMBEGINPAGE {
FrameDict begin
} def % used infrequently, so no bind
/FMENDPAGE {
end % FrameDict -- should I assert this?
} def % used infrequently, so no bind
/FMLOCAL {
FrameDict begin
0 def % force a definition to make sure room in FrameDict for later
end % FrameDict
} def % only used at startup, so no bind
% Put most defs into FrameDict.
FrameDict begin
% Hack. NXImage code generates underflows on some rotations.
/NaN 0 def
/gstring 0 def
/gfile 0 def
/gindex 0 def
/orgxfer 0 def
/yscale 0 def
/xscale 0 def
%
% Color Handling
%
%/FMPrintInColor true def
/FMPrintInColor
systemdict /colorimage known
systemdict /currentcolortransfer known or
% FMwantcolorprinting is written into the PostScript stream by FrameMaker.
FMwantcolorprinting and
def
FMPrintInColor {
/HUE 0 def
/SAT 0 def
/BRIGHT 0 def
% array of arrays Hue and Sat values for the separations [HUE BRIGHT]
/Colors [
[0 0 ] % black
[0 0 ] % white
[0.00 1.0] % red
[0.37 1.0] % green
[0.60 1.0] % blue
[0.50 1.0] % cyan
[0.83 1.0] % magenta
[0.16 1.0] % comment
] def
/K {
Colors exch get dup
0 get /HUE exch store
1 get /BRIGHT exch store
HUE 0 eq BRIGHT 0 eq and {
1.0 SAT sub setgray
} {
HUE SAT BRIGHT sethsbcolor
} ifelse
} def
/KT /K load def
/mysetgray {
/SAT exch 1.0 exch sub store
HUE 0 eq BRIGHT 0 eq and {
1.0 SAT sub setgray
} {
HUE SAT BRIGHT sethsbcolor
} ifelse
} bind def
} {
/mysetgray /setgray load def
/K /pop load def
/KT /pop load def
} ifelse
%
% pattern filling has to use setgray, so we keep track of what the
% gray value should really be.
%
/G { /savedgray exch def savedgray mysetgray } def
/setpattern { % <0F1E3C78F0E1C387> 8 1
% orgfreq organgle orgproc cvx setscreen
/bwidth exch def
/bpside exch def
/bstring exch def
/onbits 0 def
/offbits 0 def
freq sangle landscape {90 add} if
{
/y exch def
/x exch def
/xindex x 1 add 2 div bpside mul cvi def
/yindex y 1 add 2 div bpside mul cvi def
bstring yindex bwidth mul xindex 8 idiv add get
1 7 xindex 8 mod sub bitshift and 0 ne
{/onbits onbits 1 add def 1}
{/offbits offbits 1 add def 0}
ifelse
} setscreen
tran offbits 64 mul offbits onbits add div cvi get mysetgray
} bind def
/myfonts [] def
/procarray 30 array def
3.86 setmiterlimit
currentscreen cvlit
/orgproc exch def
/organgle exch def /orgfreq exch def
/currentpat -1 def
%
% make sure we are setup for the current desired pattern fill
%
/checkpat {
graymode currentpat desiredpat ne or {
pats desiredpat get exec
/graymode false store
/currentpat desiredpat store
} if
} bind def
/Z { checkpat fill } bind def
%
% make sure we are setup to gray ink
%
/checkink {
graymode not {
orgfreq organgle orgproc cvx setscreen
/graymode true store
savedgray mysetgray
} if
} bind def
/F {
checkink fill
} bind def
/dorectfill {
checkink rectfill
} bind def
/dorectstroke {
checkink rectstroke
} bind def
/S {
checkink stroke
} bind def
/FmEncoding [
/.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 /Adieresis /Aring /Ccedilla /Eacute
/Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis
/atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis
/iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve
/ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex
/udieresis /dagger /.notdef /cent /sterling /section /bullet
/paragraph /germandbls /registered /copyright /trademark /acute
/dieresis /.notdef /AE /Oslash /.notdef /.notdef /.notdef /.notdef
/yen /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/ordfeminine /ordmasculine /.notdef /ae /oslash /questiondown
/exclamdown /logicalnot /.notdef /florin /.notdef /.notdef
/guillemotleft /guillemotright /ellipsis /.notdef /Agrave /Atilde
/Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright
/quoteleft /quoteright /.notdef /.notdef /ydieresis /Ydieresis
/fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl
/periodcentered /quotesinglbase /quotedblbase /perthousand
/Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute
/Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve
/Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron
/breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron
] def
/FmEncode { % basefontdict => newfontdict
/basefontdict exch def
/newfontdict basefontdict maxlength 3 add dict def
basefontdict {
exch dup /FID ne {
dup /Encoding eq {
exch pop FmEncoding
} {
exch
} ifelse
newfontdict 3 1 roll put
} {
pop pop
} ifelse
} forall
newfontdict
} def
/rrectpath { % r x y w h => - (make a round rect path)
smat
4 2 roll TR % r w h
/h exch def /w exch def /r exch def
mark
r 0 M
w 0 w h r arcto w h 0 h r arcto
0 h 0 0 r arcto 0 0 w 0 r arcto C
cleartomark
rmat
} def
/RF { % r x y w h
rrectpath F
} bind def
/RP { % r x y w h
checkpat rrectpath fill
} bind def
/RS { % r x y w h
rrectpath S
} bind def
/RQ { % r x y w h
checkpat rrectpath A fill
} bind def
/NF { % x y w h
dorectfill
} bind def
/NR { % w h x y
checkpat
4 2 roll
rectfill
} bind def
/W { % x y w h
savedgray 5 1 roll 1.0 G dorectfill G } bind def
/PP { % int n
newpath
3 1 roll M 1 sub
{ lineto } repeat
} bind def
/SP { % int n
3 1 roll M 3 div cvi
{ curveto } repeat
} bind def
/rectpath { % w h x y
M dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto C
} def
/N { % x y w h
dorectstroke
} bind def
/NQ { % int w, int h, int x, int y
checkpat
4 2 roll
rectstroke
} bind def
% fill a box with a pattern
/replbox { % string datastring, string proc, int w, int h, int x, int y
M dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto C
currentgray .5 setgray fill setgray pop pop
} def
/graybox { % x y w h => -
currentgray 5 1 roll
.6666666 setgray rectfill setgray
} bind def
/darkgraybox { % x y w h => -
currentgray 5 1 roll
.333333 setgray rectfill setgray
} bind def
/arcpath { % int th, int dth, int w, int h, int x, int y
newpath
TR
/h exch def
/w exch def
/dth exch def
/th exch def
90 th dth add sub 90 th sub % theta1 theta2
dth 0 lt
{ exch } if
1 h w div neg scale
0 0 w 2 div 5 -2 roll arc
} def
/AS { % int th, int dth, int w, int h, int x, int y
smat
arcpath
rmat
S
} bind def
/AP { % int th, int dth, int w, int h, int x, int y
checkpat
smat
arcpath
rmat
A fill
} bind def
/AF { % int th, int dth, int w, int h, int x, int y
smat
arcpath
0 0 lineto
rmat
F
} bind def
/AQ { % int th, int dth, int w, int h, int x, int y
checkpat
smat
arcpath
0 0 lineto
rmat
fill
} bind def
/mymakefont { % i name size
/size exch def
/name exch def
/i exch def
/myfontdict name cvn findfont def
%
% FrameMaker provides its own encoding vector for fonts in which
% normal alphabetic characters are printed (it doesn't change the
% encoding vector for Symbol fonts). The way we detect an
% alphabetic character font is by name: if the encoding vector
% is either StandardEncoding (Adobe's standard) or NextStepEncoding
% (the default on the NeXT system), then it's assume it's for
% alphabetic characters, and re-encode it.
%
% This first part is concerned with discovering the encoding vector's
% name and comparing it to StandardEncoding and NextStepEncoding.
% The process is complicated by the fact that not every printer
% understands NextStepEncoding.
% Leave on the stack 1 or 0, telling whether we need to re-encode.
%
% A better way to do this might be to have FrameMaker pass to
% mymakefont a flag indicating that "you need to re-encode."
%
myfontdict begin
Encoding StandardEncoding eq
/NextStepEncoding where { pop Encoding NextStepEncoding eq or } if
end % myfontdict
%
% Based on the 1 or 0 atop the stack, re-encode if necessary.
%
{
myfontdict FmEncode /gfontdict exch def
/gfontdict (F ) dup 1 i ( ) cvs putinterval cvn
gfontdict definefont def
} {
/gfontdict myfontdict def
} ifelse
/myfonts [ myfonts aload pop null ] def
myfonts i gfontdict [size 0 0 size neg 0 0 ] makefont put
} def
/mymakefontmetric { % i name size printermetrics
/BitmapWidths exch 0 eq def % the font reencoding will add this to font
mymakefont
} def
/FF { % i
myfonts exch get setfont
} bind def
/cliptowindow {
initclip
} def
/beginprintcode { % -x -y w h scale dx dy
GS
newpath 1 setlinewidth 0 SL 0 setlinejoin
[] 0 setdash 0 setgray 10 setmiterlimit
/FMdicttop countdictstack 1 add def % high-water mark of dict stack
/FMoptop count 7 sub def % tricky! 7 params on stack, plus "/FMoptop"
200 dict begin
/showpage {} def
TR % translate to bottom left
dup neg scale % convert to postscript coordinates
0.0 0.0 M
} def
/endprintcode {
count -1 FMoptop {pop pop} for % clear user junk from operand stack
countdictstack -1 FMdicttop {pop end} for % ditto for dict stack
GR
} def
/beginPSInsetprintcode {
/pinsetsave save def
newpath 1 setlinewidth 0 setlinecap 0 setlinejoin
[] 0 setdash 0 setgray 10 setmiterlimit
/FMdicttop countdictstack 1 add def % high-water mark of dict stack
/FMoptop count def % tricky! +1 in both cases for the 'for' loop.
200 dict begin
/showpage {} def
/showimage {} def
} def
/endPSInsetprintcode {
count -1 FMoptop {pop pop} for % clear user junk from operand stack
countdictstack -1 FMdicttop {pop end} for % ditto for dict stack
pinsetsave restore
} def
/cacheimage { % destX destY destWidth destHeight w h bps theta flip
/flip exch def
/theta exch def
/bps exch def
/h exch def
/w exch def
/destHeight exch def
/destWidth exch def
/destY exch def
/destX exch def
/rowbytes w bps mul 7 add 8 idiv def
/buffer rowbytes string def
GS
destX destY TR
theta rotate
destWidth flip {neg} if destHeight scale
w h bps
% [w 0 0 h neg 0 h ]
[w 0 0 h 0 h ]
{ currentfile buffer readhexstring pop } bind
image
GR
} def
/inch{72 mul}def
/paperheight 0 def /paperwidth 0 def
/pagedimen {
paperheight sub abs 16 lt exch
paperwidth sub abs 16 lt and
{/papername exch def} {pop} ifelse
} def
/setpapername {
/papersizedict 14 dict def
papersizedict begin
/papername /unknown def
/Letter 8.5 inch 11.0 inch pagedimen
/LetterSmall 7.68 inch 10.16 inch pagedimen
/Tabloid 11.0 inch 17.0 inch pagedimen
/Ledger 17.0 inch 11.0 inch pagedimen
/Legal 8.5 inch 14.0 inch pagedimen
/Statement 5.5 inch 8.5 inch pagedimen
/Executive 7.5 inch 10.0 inch pagedimen
/A3 11.69 inch 16.5 inch pagedimen
/A4 8.26 inch 11.69 inch pagedimen
/A4Small 7.47 inch 10.85 inch pagedimen
/B4 10.125 inch 14.33 inch pagedimen
/B5 7.16 inch 10.125 inch pagedimen
end
} def
/papersize {
papersizedict begin
/Letter {lettertray letter} def
/LetterSmall {lettertray lettersmall} def
/Tabloid {11x17tray 11x17} def
/Ledger {ledgertray ledger} def
/Legal {legaltray legal} def
/Statement {statementtray statement} def
/Executive {executivetray executive} def
/A3 {a3tray a3} def
/A4 {a4tray a4} def
/A4Small {a4tray a4small} def
/B4 {b4tray b4} def
/B5 {b5tray b5} def
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
/FMdicttop countdictstack 1 add def
statusdict begin stopped end
countdictstack -1 FMdicttop {pop end} for
} def
/manualpapersize {
papersizedict begin
/Letter {letter} def
/LetterSmall {lettersmall} def
/Tabloid {11x17} def
/Ledger {ledger} def
/Legal {legal} def
/Statement {statement} def
/Executive {executive} def
/A3 {a3} def
/A4 {a4} def
/A4Small {a4small} def
/B4 {b4} def
/B5 {b5} def
/unknown {unknown} def
papersizedict dup papername known {papername} {/unknown} ifelse get
end
stopped
} def
/desperatepapersize {
statusdict /setpageparams known {
paperwidth paperheight 0 1
statusdict begin
{setpageparams} stopped pop
end
} if
} def
/manualfeed false def
% sbs 910917
/FmHorrible {
4 dict begin
/execuserobject {pop} def
/undefineuserobject {pop} def
/termwindow {} def
/currentgstate {null} def
} def
/FmEndHorrible {
end
} def
end % of FrameDict definitions
% This name needs to be outside FrameDict because it's called by
% NeXT code outside any printable page.
/FmConfigurePaper { % width height name manualfeed FmConfigurePaper -
FrameDict begin
pop % sacrifice manualfeed, for now.
pop % sacrifice name, for now.
/paperheight exch def /paperwidth exch def
setpapername
manualfeed {true} {papersize} ifelse
{manualpapersize} {false} ifelse
{desperatepapersize} if
end
} def
%
% OPI stuff
%
/ALDsave FMLOCAL
/ALDmatrix matrix def ALDmatrix currentmatrix pop
/StartALD {
/ALDsave save def
savematrix
ALDmatrix setmatrix
} bind def
/InALD {
restorematrix
} bind def
/DoneALD {
ALDsave restore
} bind def
% OPI end