diff options
Diffstat (limited to 'tests/ps-ref/prolog-4.ps')
-rw-r--r-- | tests/ps-ref/prolog-4.ps | 147 |
1 files changed, 144 insertions, 3 deletions
diff --git a/tests/ps-ref/prolog-4.ps b/tests/ps-ref/prolog-4.ps index bc783b2..500bb6b 100644 --- a/tests/ps-ref/prolog-4.ps +++ b/tests/ps-ref/prolog-4.ps @@ -23,8 +23,7 @@ /a2psdict 200 dict def a2psdict begin %%BeginProlog -%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana -%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana +%%Copyright: (c) 1988-2017 Free Software Foundation, Inc. % Check PostScript language level. /languagelevel where { pop /gs_languagelevel languagelevel def @@ -114,7 +113,11 @@ a2psdict begin % Return the y size of the current font % - => fontsize /currentfontsize { - currentfont /FontMatrix get 3 get 1000 mul + currentfont /FontType get 0 eq { + currentfont /FontMatrix get 3 get + }{ + currentfont /FontMatrix get 3 get 1000 mul + } ifelse } bind def % reencode the font @@ -161,6 +164,144 @@ a2psdict begin end } bind def +% composite fonts for ASCII-EUC mixed strings +% Version 1.2 1/31/1990 +% Original Ken'ichi HANDA (handa@etl.go.jp) +% Modified Norio Katayama (katayama@rd.nacsis.ac.jp),1998 +% Extend & Fix Koji Nakamaru (maru@on.cs.keio.ac.jp), 1999 +% Anyone can freely copy, modify, distribute this program. + +/copyfont { % font-dic extra-entry-count copyfont font-dic + 1 index maxlength add dict begin + { 1 index /FID ne 2 index /UniqueID ne and + {def} {pop pop} ifelse + } forall + currentdict + end +} bind def + +/compositefont { % ASCIIFontName EUCFontName RomanScale RomanOffset Rot(T/F) compositefont font + /RomanRotation exch def + /RomanOffset exch def + /RomanScale exch def + userdict /fixeucfont_dict known not { + userdict begin + /fixeucfont_dict 2 dict begin + /UpperByteEncoding [ + 16#00 1 16#20 { pop 0 } for + 16#21 1 16#28 { 16#20 sub } for + 16#29 1 16#2F { pop 0 } for + 16#30 1 16#74 { 16#27 sub } for + 16#75 1 16#FF { pop 0 } for + ] def + /LowerByteEncoding [ + 16#00 1 16#A0 { pop /.notdef } for + 16#A1 1 16#FE { 16#80 sub 16 2 string cvrs + (cXX) dup 1 4 -1 roll + putinterval cvn } for + /.notdef + ] def + currentdict + end def + end + } if + findfont dup /FontType get 0 eq { + 14 dict begin + % + % 7+8 bit EUC font + % + 12 dict begin + /EUCFont exch def + /FontInfo (7+8 bit EUC font) readonly def + /PaintType 0 def + /FontType 0 def + /FontMatrix matrix def + % /FontName + /Encoding fixeucfont_dict /UpperByteEncoding get def + /FMapType 2 def + EUCFont /WMode known + { EUCFont /WMode get /WMode exch def } + { /WMode 0 def } ifelse + /FDepVector [ + EUCFont /FDepVector get 0 get + [ 16#21 1 16#28 {} for 16#30 1 16#74 {} for ] + { + 13 dict begin + /EUCFont EUCFont def + /UpperByte exch 16#80 add def + % /FontName + /FontInfo (EUC lower byte font) readonly def + /PaintType 0 def + /FontType 3 def + /FontMatrix matrix def + /FontBBox {0 0 0 0} def + /Encoding + fixeucfont_dict /LowerByteEncoding get def + % /UniqueID + % /WMode + /BuildChar { + gsave + exch dup /EUCFont get setfont + /UpperByte get + 2 string + dup 0 4 -1 roll put + dup 1 4 -1 roll put + dup stringwidth setcharwidth + 0 0 moveto show + grestore + } bind def + currentdict + end + /lowerbytefont exch definefont + } forall + ] def + currentdict + end + /eucfont exch definefont + exch + findfont 1 copyfont dup begin + RomanRotation { + /FontMatrix FontMatrix + [ 0 RomanScale neg RomanScale 0 RomanOffset neg 0 ] + matrix concatmatrix def + }{ + /FontMatrix FontMatrix + [ RomanScale 0 0 RomanScale 0 RomanOffset ] matrix concatmatrix + def + /CDevProc + {pop pop pop pop 0 exch -1000 exch 2 div 880} def + } ifelse + end + /asciifont exch definefont + exch + /FDepVector [ 4 2 roll ] def + /FontType 0 def + /WMode 0 def + /FMapType 4 def + /FontMatrix matrix def + /Encoding [0 1] def + /FontBBox {0 0 0 0} def +% /FontHeight 1.0 def % XXXX + /FontHeight RomanScale 1.0 ge { RomanScale }{ 1.0 } ifelse def + /Descent -0.3 def % XXXX + currentdict + end + /tmpfont exch definefont + pop + /tmpfont findfont + }{ + pop findfont 0 copyfont + } ifelse +} def + +/slantfont { % FontName slant-degree slantfont font' + exch findfont 1 copyfont begin + [ 1 0 4 -1 roll 1 0 0 ] FontMatrix exch matrix concatmatrix + /FontMatrix exch def + currentdict + end +} def + % Function print line number (<string> # -) /# { gsave |