home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.0 (User) / OS_user_4.0.iso / NextLibrary / Frameworks / AppKit.framework / Versions / B / Resources / printPackageJ.ps < prev    next >
Encoding:
Text File  |  1996-03-05  |  23.1 KB  |  539 lines

  1. %!
  2. %
  3. %    printPackageJ.ps
  4. %    Application Kit
  5. %    Copyright (c) 1988-1996, NeXT Software, Inc.
  6. %    All rights reserved.
  7. %
  8.  
  9. /__NXdef{1 index where{pop pop pop}{def}ifelse}bind def
  10. /__NXbdef{1 index where{pop pop pop}{bind def}ifelse}bind def
  11. /UserObjects 10 array __NXdef
  12. /defineuserobject{
  13.     exch dup 1 add dup UserObjects length gt{
  14.         array dup 0 UserObjects putinterval
  15.         /UserObjects exch def
  16.     }{pop}ifelse UserObjects exch 3 -1 roll put
  17. }__NXbdef
  18. 0 0 defineuserobject
  19. 1 null defineuserobject
  20. /undefineuserobject{UserObjects exch null put}__NXbdef
  21. /execuserobject{UserObjects exch get exec}__NXbdef
  22. /__NXRectPath{4 2 roll moveto 1 index 0 rlineto
  23. 0 exch rlineto neg 0 rlineto closepath}__NXbdef
  24. /__NXProcessRectArgs{
  25.     1 index type /arraytype eq{
  26.         exch 0 4 2 index length 1 sub{
  27.             dup 3 add 1 exch{1 index exch get exch}for
  28.             5 1 roll 5 index exec
  29.         }for pop pop
  30.     }{exec}ifelse
  31. }__NXbdef
  32. /rectfill{gsave newpath {__NXRectPath fill} __NXProcessRectArgs grestore}__NXbdef
  33. /rectclip{newpath {__NXRectPath} __NXProcessRectArgs clip newpath}__NXbdef
  34. /rectstroke{
  35.     gsave newpath dup type /arraytype eq{dup length 6 eq}{false}ifelse{
  36.         {gsave __NXRectPath null concat stroke grestore}
  37.         dup length array cvx copy dup 2 4 -1 roll put __NXProcessRectArgs
  38.     }{{__NXRectPath stroke} __NXProcessRectArgs}ifelse grestore
  39. }__NXbdef
  40. /_NXLevel2 systemdict /languagelevel known {languagelevel 2 ge}{false}ifelse __NXdef
  41. systemdict /cshow known {
  42. /xyshow {
  43.     {
  44.     pop pop currentpoint 3 index 1 get add exch 3 index 0 get add exch
  45.     4 -1 roll dup length 2 sub 2 exch getinterval 4 1 roll
  46.     ( ) dup 0 6 -1 roll put show moveto
  47.     } 3 -1 roll cshow
  48.     pop
  49. }__NXbdef
  50. /xshow {
  51.     {
  52.     pop pop currentpoint exch 3 index 0 get add exch
  53.     4 -1 roll dup length 1 sub 1 exch getinterval 4 1 roll
  54.     ( ) dup 0 6 -1 roll put show moveto
  55.     } 3 -1 roll cshow
  56.     pop
  57. }__NXbdef
  58. /yshow{
  59.     {
  60.     pop pop currentpoint 3 index 0 get add
  61.     4 -1 roll dup length 1 sub 1 exch getinterval 4 1 roll
  62.     ( ) dup 0 6 -1 roll put show moveto
  63.     } 3 -1 roll cshow
  64.     pop
  65. }__NXbdef
  66. }{
  67. /xyshow{
  68.     0 1 3 index length 1 sub{
  69.         currentpoint 4 index 3 index 1 getinterval show
  70.         3 index 3 index 2 mul 1 add get add exch
  71.         3 index    3 index 2 mul get add exch moveto pop
  72.     }for pop pop
  73. }__NXbdef
  74. /xshow{
  75.     0 1 3 index length 1 sub{
  76.         currentpoint 4 index 3 index 1 getinterval show
  77.         exch 3 index 3 index get add exch moveto pop
  78.     }for pop pop
  79. }__NXbdef
  80. /yshow{
  81.     0 1 3 index length 1 sub{
  82.         currentpoint 4 index 3 index 1 getinterval show
  83.         3 index 3 index get add moveto pop
  84.     }for pop pop
  85. }__NXbdef
  86. } ifelse
  87. /arct{arcto pop pop pop pop}__NXbdef
  88. /setbbox{pop pop pop pop}__NXbdef
  89. /ucache{}__NXbdef
  90. /ucachestatus{mark 0 0 0 0 0}__NXbdef
  91. /setucacheparams{cleartomark}__NXbdef
  92. /uappend{systemdict begin cvx exec end}__NXbdef
  93. /ueofill{gsave newpath uappend eofill grestore}__NXbdef
  94. /ufill{gsave newpath uappend fill grestore}__NXbdef
  95. /ustroke{
  96.     gsave newpath dup length 6 eq
  97.     {exch uappend concat}{uappend}ifelse
  98.     stroke grestore
  99. }__NXbdef
  100. /__NXustrokepathMatrix dup where {pop pop}{matrix def}ifelse
  101. /ustrokepath{
  102.     newpath dup length 6 eq{
  103.         exch uappend __NXustrokepathMatrix currentmatrix exch concat
  104.         strokepath setmatrix
  105.     }{uappend strokepath}ifelse
  106. } __NXbdef
  107. /upath{
  108.     [exch {/ucache cvx}if pathbbox /setbbox cvx
  109.      {/moveto cvx}{/lineto cvx}{/curveto cvx}{/closepath cvx}pathforall]cvx
  110. } __NXbdef
  111. /setstrokeadjust{pop}__NXbdef
  112. /currentstrokeadjust{false}__NXbdef
  113. /selectfont{exch findfont exch
  114. dup type /arraytype eq {makefont}{scalefont}ifelse setfont}__NXbdef
  115. /_NXCombineArrays{
  116.     counttomark dup 2 add index dup length 3 -1 roll {
  117.         2 index length sub dup 4 1 roll 1 index exch 4 -1 roll putinterval exch
  118.     }repeat pop pop pop
  119. }__NXbdef
  120. /flushgraphics{}def
  121. /setwindowtype{pop pop}def
  122. /currentwindowtype{pop 0}def
  123. /setalpha{pop}def
  124. /currentalpha{1.0}def
  125. /hidecursor{}def
  126. /obscurecursor{}def
  127. /revealcursor{}def
  128. /setcursor{4 {pop}repeat}bind def
  129. /showcursor{}def
  130.  
  131. /SharedFontDirectory FontDirectory __NXdef
  132. /_JPN /GothicBBB-Medium.Hankaku dup findfont /FontName get eq def
  133. /_@Private dup where {pop pop}{50 dict def}ifelse
  134. /__NJdef _JPN {{//_@Private 3 1 roll put}}{{pop pop}} ifelse bind def
  135. /__NJbdef _JPN {{//_@Private 2 index known {pop pop}{bind //_@Private 3 1 roll put}ifelse}}{{pop pop}} ifelse bind def
  136. /_str 128 string __NJdef
  137. /_find { % /FName _find FontOrFName bool
  138.     false 0 {dup 3 index known {3 -1 roll get exch pop true exit}{pop}ifelse} forall
  139. } bind dup 1
  140. [/SharedFontDirectory dup where {exch get}{pop}ifelse //FontDirectory] put //_@Private 3 1 roll put
  141. /_copyfont@ { % -font- extension _copyfont@ -dict-
  142.     1 index maxlength add dict begin {
  143.     1 index /FID ne 2 index /UniqueID ne and {def}{pop pop}ifelse
  144.     } forall currentdict end
  145. } __NJbdef
  146. /_bind { % /n1 /n2 _bind /n1+2
  147.     exch dup length 2 index length add _str 4 2 roll
  148.     _str cvs length exch dup length string cvs putinterval
  149.     _str exch 0 exch getinterval cvn
  150. } __NJbdef
  151. /NDEncoding 256 array dup 0 1 255 {/.notdef put dup} for pop __NJdef
  152. /_shiftE { % /Fname start length target -font- _shiftE -dict-
  153.     0 _copyfont@ begin Encoding 4 2 roll getinterval NDEncoding 256 array
  154.     copy dup 4 -2 roll putinterval Encoding length 256 eq {
  155.     dup dup 0 128 getinterval 128 exch putinterval } if
  156.     /Encoding exch def /FontName exch def currentdict end
  157. } __NJbdef
  158. /_makeSGFDV { % - _makeSGFDV [FDV]
  159.     [ _FN /.WP-Symbol _bind dup findfont dup /FontName get 3 -1 roll ne {
  160.       pop /_FN /GothicBBB-Medium __NJdef /GothicBBB-Medium.WP-Symbol findfont
  161.     } if
  162.     _SGFN /.rFC _bind dup 0 96 32 5 index _shiftE definefont
  163.     _SGFN /.rFD _bind dup 96 32 32 6 index _shiftE definefont
  164.     _SGFN /.rFE _bind dup 0 128 0 _FN /-Ext-H _bind findfont dup /Encoding get
  165.     16#2d get exch /FDepVector get exch get _shiftE dup /Encoding 2 copy get
  166.     [16#f0 16#f1 16#f2 16#f5 16#f6 16#f7 16#fa 16#fb 16#fc] {
  167.     dup 2 index exch /.notdef put 128 sub 1 index exch /.notdef put
  168.     } forall put definefont
  169.     ] dup 0 /NotDefFont findfont put
  170. } __NJbdef
  171. /_defSGaiji { % /fullname /basename _defSGaiji -sysGaiji-
  172.     /_FN exch __NJdef /_SGFN exch __NJdef 15 dict
  173.     dup /FontName _SGFN put    dup /FontType 0 put
  174.     dup /FMapType 2 put        dup /FontMatrix matrix put
  175.     dup /FontBBox {0 -140 1000 880} put
  176.     dup /Encoding 256 array 0 1 255 {1 index exch 0 put}for
  177.     dup 16#FC 1 put    dup 16#FD 2 put    dup 16#FE 3 put put
  178.     dup /FDepVector _makeSGFDV put    dup /isNeXTGaiji true put
  179.     _SGFN exch definefont
  180. } __NJbdef
  181. /_defNeXTF { % /fullname /basename Hflag _defNeXTF
  182.     /_FN 2 index __NJdef /_HF exch __NJdef _HF {/-EUC-H}{/-EUC-V}ifelse
  183.     _bind dup findfont dup /FontName get 3 -1 roll ne {
  184.       pop _HF {/GothicBBB-Medium-EUC-H}{/GothicBBB-Medium-EUC-V}ifelse findfont
  185.     } if
  186.     1 _copyfont@ begin
  187.     /FontName 1 index def
  188.     /UserGaijiName _FN /-NeXT-UserGaiji _bind def
  189.     /Encoding Encoding dup length array copy FMapType 2 eq {dup 16#8E 78 put
  190.     0 1 9 {dup 16#F5 add exch 79 add 2 index 3 1 roll put} for
  191.     }{  dup 16#11D 78 put
  192.     0 1 9 {dup dup add 16#1EB add exch 79 add 2 index 3 1 roll put} for
  193.     } ifelse def
  194.     /FDepVector [FDepVector aload pop _FN /.Hankaku _bind
  195.     dup /_ _bind exch 128 128 0 3 index findfont _shiftE definefont
  196.     UserGaijiName findfont dup /isNeXTGaiji 2 copy known {
  197.         get {/FDepVector get 1 7 getinterval aload pop
  198.         }{pop /NotDefFont findfont 6 {dup} repeat}ifelse
  199.     }{pop pop pop /NotDefFont findfont 6 {dup} repeat}ifelse
  200.     _FN /-NeXT-SystemGaiji _bind findfont /FDepVector get 1 3 getinterval
  201.     aload pop] def
  202.     currentdict end definefont
  203. } __NJbdef
  204. /_findNarrow { % /FName _findNarrow -font-
  205.     dup _str cvs (Narrow) anchorsearch {pop cvn exch _find {exch pop}{
  206.     exch findfont 0 _copyfont@ dup /FontName 3 index put
  207.     dup /FontMatrix 2 copy get [5 6 div 0 0 1 0 0] matrix concatmatrix put
  208.     definefont}ifelse
  209.     }{pop findfont}ifelse
  210. } __NJbdef
  211. /_defNXR { % /NXname /rname _defNXR -font-
  212.     findfont 0 _copyfont@
  213.     dup /FontName 3 index put
  214.     dup /Encoding NextStepEncoding put definefont
  215. } bind def
  216. /_defmixfont@ { % /FName [/ASCII /KANJI shiftmtx] _defmixfont@ -font-
  217.     aload pop /_@shiftmatrix exch __NJdef (-NeXT-H) _bind findfont
  218.     /_EUC exch __NJdef _findNarrow /_@ASCII exch __NJdef
  219.     dup /_ exch _bind dup _EUC /Encoding get length 2 idiv dup 0 _EUC _shiftE
  220.     dup /Encoding 2 copy get dup
  221.     3 index /FMapType get 5 eq {16#41}{16#20}ifelse 89 put  put
  222.     dup /FontMatrix _@shiftmatrix put
  223.     dup /FDepVector [ _EUC /FDepVector get aload pop _EUC /FMapType get 5 eq {
  224.     /_S_ _@ASCII /FontName get _bind _@ASCII 0 _copyfont@
  225.     dup /Encoding 2 copy get 256 array copy dup dup dup 0 128 getinterval
  226.     128 exch putinterval 0 _@ASCII /Encoding get 128 128 getinterval
  227.     putinterval put dup /FontName 3 index put definefont
  228.     }{_@ASCII}ifelse
  229.      _@shiftmatrix matrix invertmatrix makefont] put definefont
  230.     15 dict begin
  231.     /FontName 2 index def
  232.     /FontType 0 def     /PaintType 0 def
  233.     /FMapType 4 def     /FontMatrix matrix def
  234.     /Encoding [0 1] def /PrefEnc 1 index /Encoding get def
  235.     /FontBBox _@ASCII /FontBBox get 4 array copy cvx
  236.         dup 2 get 1000 lt {dup 2 1000 put}if
  237.         dup 3 get 880 lt {dup 3 880 put}if def
  238.     /FontInfo _@ASCII /FontInfo get def
  239.     /FDepVector [_@ASCII 4 -1 roll] def
  240.     currentdict end definefont
  241. } __NJbdef
  242.  
  243. % constructing EUC composites from printer fonts
  244. /_HEI /HeiseiMin-W3.Hankaku dup findfont /FontName get eq def
  245. _HEI {
  246.     % If we can find the Heisei fonts...
  247.    _JPN {}{
  248.     % and cannot find the Morisawa fonts...
  249.     % define Ryumin-Light-EUC-H in terms of HeiseiMin-W3
  250.     /HeiseiMin-W3-EUC-H findfont
  251.     dup length dict begin
  252.         { 1 index /FID ne {def} {pop pop} ifelse } forall
  253.         /Fontname /Ryumin-Light-EUC-H def
  254.         currentdict
  255.     end
  256.     /Ryumin-Light-EUC-H exch definefont pop
  257.     
  258.     % define GothicBBB-Medium-EUC-H in terms of HeiseiKakuGo-W5
  259.     /HeiseiKakuGo-W5-EUC-H findfont
  260.     dup length dict begin
  261.         { 1 index /FID ne {def} {pop pop} ifelse } forall
  262.         /Fontname /GothicBBB-Medium-EUC-H def
  263.         currentdict
  264.     end
  265.     /GothicBBB-Medium-EUC-H exch definefont pop
  266.     } ifelse
  267. } if
  268.  
  269. _HEI {    % define everything in terms of Heisei fonts
  270.     % define Morisawa names -> Heisei
  271.         /FixedRyuminCourier-Light {
  272.             [/NarrowCourier /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  273.         /FixedRyuminCourier-LightOblique {
  274.             [/NarrowCourier-Oblique /HeiseiMin-W3-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  275.         /FixedRyuminCourier-Bold {
  276.             [/NarrowCourier-Bold /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  277.         /FixedRyuminCourier-BoldOblique {
  278.             [/NarrowCourier-BoldOblique /HeiseiMin-W3-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  279.         /RyuminTimes-Light {
  280.             [/Times-Roman /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  281.         /RyuminTimes-LightOblique {
  282.             [/Times-Italic /HeiseiMin-W3-EUC-H [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  283.         /RyuminTimes-Bold {
  284.             [/Times-Bold /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  285.         /RyuminTimes-BoldOblique {
  286.             [/Times-BoldItalic /HeiseiMin-W3-EUC-H [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  287.         /FixedGothicBBBCourier {
  288.             [/NarrowCourier /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  289.         /FixedGothicBBBCourier-Oblique {
  290.             [/NarrowCourier-Oblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  291.         /FixedGothicBBBCourier-Bold {
  292.             [/NarrowCourier-Bold /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  293.         /FixedGothicBBBCourier-BoldOblique {
  294.             [/NarrowCourier-BoldOblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  295.         /GothicBBBHelvetica {
  296.             [/Helvetica /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  297.         /GothicBBBHelvetica-Oblique {
  298.             [/Helvetica-Oblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  299.         /GothicBBBHelvetica-Bold {
  300.             [/Helvetica-Bold /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  301.         /GothicBBBHelvetica-BoldOblique {
  302.             [/Helvetica-BoldOblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  303.         /TitleGothicBBBHelvetica {
  304.             [/Helvetica /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  305.         /TitleGothicBBBHelvetica-Bold {
  306.             [/Helvetica-Bold /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  307.     % define Heisei names -> Heisei
  308.         /FixedHeiseiMinCourier-Light {
  309.             [/NarrowCourier /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  310.         /FixedHeiseiMinCourier-LightOblique {
  311.             [/NarrowCourier-Oblique /HeiseiMin-W3-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  312.         /FixedHeiseiMinCourier-Bold {
  313.             [/NarrowCourier-Bold /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  314.         /FixedHeiseiMinCourier-BoldOblique {
  315.             [/NarrowCourier-BoldOblique /HeiseiMin-W3-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  316.         /HeiseiMinTimes-Light {
  317.             [/Times-Roman /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  318.         /HeiseiMinTimes-LightOblique {
  319.             [/Times-Italic /HeiseiMin-W3-EUC-H [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  320.         /HeiseiMinTimes-Bold {
  321.             [/Times-Bold /HeiseiMin-W3-EUC-H matrix] _defmixfont@} __NJbdef
  322.         /HeiseiMinTimes-BoldOblique {
  323.             [/Times-BoldItalic /HeiseiMin-W3-EUC-H [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  324.         /FixedHeiseiKakuGoCourier {
  325.             [/NarrowCourier /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  326.         /FixedHeiseiKakuGoCourier-Oblique {
  327.             [/NarrowCourier-Oblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  328.         /FixedHeiseiKakuGoCourier-Bold {
  329.             [/NarrowCourier-Bold /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  330.         /FixedHeiseiKakuGoCourier-BoldOblique {
  331.             [/NarrowCourier-BoldOblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  332.         /HeiseiKakuGoHelvetica {
  333.             [/Helvetica /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  334.         /HeiseiKakuGoHelvetica-Oblique {
  335.             [/Helvetica-Oblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  336.         /HeiseiKakuGoHelvetica-Bold {
  337.             [/Helvetica-Bold /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  338.         /HeiseiKakuGoHelvetica-BoldOblique {
  339.             [/Helvetica-BoldOblique /HeiseiKakuGo-W5-EUC-H [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  340.         /HeiseiKakuGoHelvetica {
  341.             [/Helvetica /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  342.         /HeiseiKakuGoHelvetica-Bold {
  343.             [/Helvetica-Bold /HeiseiKakuGo-W5-EUC-H matrix] _defmixfont@} __NJbdef
  344. }{
  345.     _JPN {
  346.     % define everything in terms of Morisawa fonts
  347.     % define Morisawa names -> Morisawa
  348.         /FixedRyuminCourier-Light {
  349.             [/NarrowCourier /Ryumin-Light matrix] _defmixfont@} __NJbdef
  350.         /FixedRyuminCourier-LightOblique {
  351.             [/NarrowCourier-Oblique /Ryumin-Light [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  352.         /FixedRyuminCourier-Bold {
  353.             [/NarrowCourier-Bold /Ryumin-Light matrix] _defmixfont@} __NJbdef
  354.         /FixedRyuminCourier-BoldOblique {
  355.             [/NarrowCourier-BoldOblique /Ryumin-Light [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  356.         /RyuminTimes-Light {
  357.             [/Times-Roman /Ryumin-Light matrix] _defmixfont@} __NJbdef
  358.         /RyuminTimes-LightOblique {
  359.             [/Times-Italic /Ryumin-Light [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  360.         /RyuminTimes-Bold {
  361.             [/Times-Bold /Ryumin-Light matrix] _defmixfont@} __NJbdef
  362.         /RyuminTimes-BoldOblique {
  363.             [/Times-BoldItalic /Ryumin-Light [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  364.         /FixedGothicBBBCourier {
  365.             [/NarrowCourier /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  366.         /FixedGothicBBBCourier-Oblique {
  367.             [/NarrowCourier-Oblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  368.         /FixedGothicBBBCourier-Bold {
  369.             [/NarrowCourier-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  370.         /FixedGothicBBBCourier-BoldOblique {
  371.             [/NarrowCourier-BoldOblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  372.         /GothicBBBHelvetica {
  373.             [/Helvetica /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  374.         /GothicBBBHelvetica-Oblique {
  375.             [/Helvetica-Oblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  376.         /GothicBBBHelvetica-Bold {
  377.             [/Helvetica-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  378.         /GothicBBBHelvetica-BoldOblique {
  379.             [/Helvetica-BoldOblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  380.         /TitleGothicBBBHelvetica {
  381.             [/Helvetica /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  382.         /TitleGothicBBBHelvetica-Bold {
  383.             [/Helvetica-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  384.     % define Heisei names -> Morisawa
  385.         /FixedHeiseiMinCourier-Light {
  386.             [/NarrowCourier /Ryumin-Light matrix] _defmixfont@} __NJbdef
  387.         /FixedHeiseiMinCourier-LightOblique {
  388.             [/NarrowCourier-Oblique /Ryumin-Light [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  389.         /FixedHeiseiMinCourier-Bold {
  390.             [/NarrowCourier-Bold /Ryumin-Light matrix] _defmixfont@} __NJbdef
  391.         /FixedHeiseiMinCourier-BoldOblique {
  392.             [/NarrowCourier-BoldOblique /Ryumin-Light [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  393.         /HeiseiMinTimes-Light {
  394.             [/Times-Roman /Ryumin-Light matrix] _defmixfont@} __NJbdef
  395.         /HeiseiMinTimes-LightOblique {
  396.             [/Times-Italic /Ryumin-Light [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  397.         /HeiseiMinTimes-Bold {
  398.             [/Times-Bold /Ryumin-Light matrix] _defmixfont@} __NJbdef
  399.         /HeiseiMinTimes-BoldOblique {
  400.             [/Times-BoldItalic /Ryumin-Light [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  401.         /FixedHeiseiKakuGoCourier {
  402.             [/NarrowCourier /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  403.         /FixedHeiseiKakuGoCourier-Oblique {
  404.             [/NarrowCourier-Oblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  405.         /FixedHeiseiKakuGoCourier-Bold {
  406.             [/NarrowCourier-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  407.         /FixedHeiseiKakuGoCourier-BoldOblique {
  408.             [/NarrowCourier-BoldOblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  409.         /HeiseiKakuGoHelvetica {
  410.             [/Helvetica /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  411.         /HeiseiKakuGoHelvetica-Oblique {
  412.             [/Helvetica-Oblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  413.         /HeiseiKakuGoHelvetica-Bold {
  414.             [/Helvetica-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  415.         /HeiseiKakuGoHelvetica-BoldOblique {
  416.             [/Helvetica-BoldOblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  417.         /HeiseiKakuGoHelvetica {
  418.             [/Helvetica /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  419.         /HeiseiKakuGoHelvetica-Bold {
  420.             [/Helvetica-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  421.     } if
  422. } ifelse
  423.  
  424. /NextStepEncoding where not{
  425. /NextStepEncoding StandardEncoding 256 array copy def
  426. 0 [129/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/Ccedilla/Egrave
  427. /Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
  428. /Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/Ugrave/Uacute
  429. /Ucircumflex/Udieresis/Yacute/Thorn/mu/multiply/divide/copyright
  430. 176/registered 181/brokenbar 190/logicalnot 192/onesuperior 201/twosuperior
  431. 204/threesuperior 209/plusminus/onequarter/onehalf/threequarters/agrave
  432. /aacute/acircumflex/atilde/adieresis/aring/ccedilla/egrave/eacute
  433. /ecircumflex/edieresis/igrave 226/iacute 228/icircumflex/idieresis/eth
  434. /ntilde 236/ograve/oacute/ocircumflex/otilde/odieresis 242/ugrave/uacute
  435. /ucircumflex 246/udieresis/yacute 252/thorn/ydieresis]
  436. {dup type /nametype eq
  437.  {NextStepEncoding 2 index 2 index put pop 1 add}{exch pop}ifelse
  438. }forall pop
  439. /NextStepEncoding NextStepEncoding readonly def
  440. /_NXfstr 128 string dup 0 (_NX) putinterval def
  441. /_NXfindfont /findfont load def
  442. /findfont{
  443.  % Because we can never let NextStepEncoding get into
  444.  % SharedFontDirectory, we cannot reencode a font to NextStepEncoding
  445.  % if we are in shared mode.  So if currentshared is true,
  446.  % we call the normal findfont and return that
  447.  _JPN {//_@Private begin
  448.     dup _str cvs (-NeXT-) search {
  449.       cvn exch pop exch cvn dup /H eq {
  450.     pop exch _find {exch pop}{exch true _defNeXTF}ifelse false
  451.       }{
  452.     dup /V eq {
  453.       pop exch _find {exch pop}{exch false _defNeXTF}ifelse false
  454.     }{
  455.       /SystemGaiji eq {
  456.         exch _find {exch pop}{exch _defSGaiji}ifelse false
  457.       }{pop true} ifelse
  458.     } ifelse
  459.       } ifelse
  460.     }{
  461.       (NX@) anchorsearch {
  462.         pop exch _find {exch pop}{exch cvn _defNXR}ifelse false
  463.       }{pop true} ifelse
  464.     } ifelse
  465.     {
  466.       dup //_@Private exch known {dup load exec false}{true}ifelse
  467.     }{false}ifelse
  468.     end
  469.  }{true}ifelse {
  470.  /currentshared where {pop currentshared} {false} ifelse
  471.  {_NXfindfont}
  472.  {dup _NXfstr 3 125 getinterval cvs length 3 add _NXfstr 0 3 -1 roll
  473.   getinterval cvn exch FontDirectory 2 index known 
  474.   {pop FontDirectory exch get}
  475.   {_NXfindfont dup /Encoding get StandardEncoding eq
  476.    {    dup length dict exch
  477.     {1 index /FID ne {2 index 3 1 roll put}{pop pop}ifelse}forall
  478.      dup /Encoding NextStepEncoding put definefont
  479.     }{exch pop} ifelse
  480.    }ifelse
  481.  }ifelse
  482.  } if
  483. }bind def
  484. }{pop}ifelse
  485. /_NXImageString {/__NXImageString where{pop}{/__NXImageString 4000 string __NXdef}ifelse __NXImageString}__NXbdef
  486. /_NXDoImageOp{
  487.     3 dict begin /parr 5 array def 1 index{dup}{1}ifelse /chans exch def
  488.     chans 2 add 2 roll parr 0 chans getinterval astore pop
  489.     5 index 4 index mul 2 index{1 sub 8 idiv 1 add mul}{mul 1 sub 8 idiv 1 add}ifelse
  490.     4 index mul /totbytes exch def pop exch pop
  491.     gsave matrix invertmatrix concat 0.5 setgray 0 0 4 2 roll rectfill grestore
  492.     {0 1 chans 1 sub{parr exch get exec length totbytes exch sub /totbytes exch def}for totbytes 0 le{exit}if}loop end
  493. }__NXbdef
  494. /alphaimage{1 add _NXDoImageOp}def
  495. _NXLevel2{ 
  496.     /NXCalibratedRGBColorSpace where{pop}{
  497.         /NXCalibratedRGBColorSpace
  498.         {mark /NXCalibratedRGB /ColorSpace findresource exch pop}stopped
  499.         {cleartomark /NXCalibratedRGB[/CIEBasedABC 2 dict dup begin 
  500.         /MatrixLMN[.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505]def
  501.         /WhitePoint[.9505 1 1.089] def end] /ColorSpace defineresource}if def}ifelse
  502.     /nxsetrgbcolor{NXCalibratedRGBColorSpace setcolorspace setcolor}__NXbdef
  503.     /nxsetgray{dup dup nxsetrgbcolor}__NXbdef
  504.     /_NXCalibratedImage{exch{array astore dup length true}{false}ifelse
  505.         8 -1 roll{NXCalibratedRGBColorSpace setcolorspace}if
  506.         8 dict dup 9 1 roll begin /ImageType 1 def /MultipleDataSources exch def
  507.         currentcolorspace 0 get /Indexed eq{pop /Decode[0 2 6 index exp 1 sub]def}
  508.         {2 mul dup array /Decode exch def 1 sub 0 1 3 -1 roll{Decode exch dup 2 mod put}for}ifelse
  509.         /DataSource exch def /ImageMatrix exch def 
  510.         /BitsPerComponent exch def /Height exch def /Width exch def end image}__NXbdef
  511. } {
  512.     /setcmykcolor{
  513.         1.0 exch sub dup dup 6 -1 roll sub dup 0 lt{pop 0}if 5 1 roll
  514.         4 -1 roll sub dup 0 lt{pop 0}if 3 1 roll exch sub dup 0 lt{pop 0}if setrgbcolor}__NXbdef
  515.     /currentcmykcolor{currentrgbcolor 3{1.0 exch sub 3 1 roll}repeat 0}__NXbdef
  516.     /colorimage{2 copy 3 ne or{_NXDoImageOp}{4 index dup 8 ne exch 4 ne and{_NXDoImageOp}{
  517.         pop pop save 6 1 roll 12 dict begin/Proc exch def/Res 0 string def
  518.         /Alloc{2 index length mul 2 add dup 2 index load length gt{1.2 mul round cvi string def}{pop pop}ifelse}def
  519.         1 index 8 eq{/Unpack{.34 Alloc}def}{
  520.             /Wid 4 index 3 mul def exch pop 8 exch/Str1 0 string def/Lim Wid def
  521.             /Unpack{.67 Alloc/Str1 2 Alloc 0 exch Lim exch
  522.                 {dup -4 bitshift 17 mul Str1 exch 4 index exch put 15 and 17 mul Str1 exch 3 index 1 add exch put
  523.                 2 sub dup 0 le{0 lt Wid exch{exch 1 sub exch}if}if exch 2 add exch
  524.                 }forall/Lim exch def Str1 exch 0 exch getinterval
  525.             }def
  526.         }ifelse
  527.         /Ops[{.3 mul add 1}{.59 mul add 2}{.11 mul add round cvi Res exch 2 index exch put 1 add 0.0 0}]def/Val 0.0 def/Phase 0 def
  528.         {0 Val Phase Proc/Res Unpack{exch Ops exch get exec}forall/Phase exch def/Val exch def Res exch 0 exch getinterval}
  529.         image end restore}ifelse}ifelse
  530.     }__NXbdef
  531.     /nxsetrgbcolor{setrgbcolor}__NXbdef /nxsetgray{setgray}__NXbdef
  532.     /setpattern{pop .5 setgray}__NXbdef
  533.     /_NXCalibratedImage{dup 1 eq {pop pop image}{colorimage}ifelse pop}__NXbdef
  534. } ifelse
  535. /_NXSetCMYKOrRGB where{pop}{
  536.     mark{systemdict /currentwindow get exec}stopped
  537.     {{pop pop pop setcmykcolor}}{{nxsetrgbcolor pop pop pop pop}}ifelse /_NXSetCMYKOrRGB exch def cleartomark
  538. }ifelse
  539.