*** iv/src/lib/Unidraw/psview.c Mon Feb 22 18:00:00 1999 --- iv-fix/src/lib/Unidraw/psview.c Mon Feb 22 18:18:06 1999 *************** *** 322,327 **** --- 322,328 ---- out << "% composite fonts for ASCII-EUC mixed string\n"; out << "% Version 1.2 1/31/1990\n"; out << "% Author Ken'ichi HANDA (handa@etl.go.jp)\n"; + out << "% Modified Norio Katayama (katayama@rd.nacsis.ac.jp),1998"; out << "% Anyone can freely copy, modify, distribute this program.\n"; out << "/copyfont { % font-dic extra-entry-count copyfont font-dic\n"; out << " 1 index maxlength add dict begin\n"; *************** *** 333,352 **** out << "} bind def\n"; out << "\n"; out << "/compositefont { % ASCIIFontName EUCFontName compositefont font'\n"; out << " findfont dup /FontType get 0 eq {\n"; out << " 12 dict begin\n"; ! out << " 1 copyfont dup begin\n"; ! out << " /Encoding Encoding\n"; ! out << " FMapType dup 2 eq {\n"; ! out << " pop 128 128\n"; ! out << " }{\n"; ! out << " 5 eq {\n"; ! out << " 256 256\n"; ! out << " }{\n"; ! out << " /compositefont errordict /invalidfont get exec\n"; ! out << " } ifelse\n"; ! out << " } ifelse\n"; ! out << " getinterval def\n"; out << " end\n"; out << " /eucfont exch definefont\n"; out << " exch\n"; --- 334,411 ---- out << "} bind def\n"; out << "\n"; out << "/compositefont { % ASCIIFontName EUCFontName compositefont font'\n"; + out << " userdict /fixeucfont_dict known not {\n"; + out << " userdict begin\n"; + out << " /fixeucfont_dict 2 dict begin\n"; + out << " /UpperByteEncoding [\n"; + out << " 16#00 1 16#20 { pop 0 } for\n"; + out << " 16#21 1 16#28 { 16#20 sub } for\n"; + out << " 16#29 1 16#2F { pop 0 } for\n"; + out << " 16#30 1 16#74 { 16#27 sub } for\n"; + out << " 16#75 1 16#FF { pop 0 } for\n"; + out << " ] def\n"; + out << " /LowerByteEncoding [\n"; + out << " 16#00 1 16#A0 { pop /.notdef } for\n"; + out << " 16#A1 1 16#FE { 16#80 sub 16 2 string cvrs\n"; + out << " (cXX) dup 1 4 -1 roll\n"; + out << " putinterval cvn } for\n"; + out << " /.notdef\n"; + out << " ] def\n"; + out << " currentdict\n"; + out << " end def\n"; + out << " end\n"; + out << " } if\n"; out << " findfont dup /FontType get 0 eq {\n"; out << " 12 dict begin\n"; ! out << " %\n"; ! out << " % 7+8 bit EUC font\n"; ! out << " %\n"; ! out << " 12 dict begin\n"; ! out << " /EUCFont exch def\n"; ! out << " /FontInfo (7+8 bit EUC font) readonly def\n"; ! out << " /PaintType 0 def\n"; ! out << " /FontType 0 def\n"; ! out << " /FontMatrix matrix def\n"; ! out << " % /FontName\n"; ! out << " /Encoding fixeucfont_dict /UpperByteEncoding get def\n"; ! out << " /FMapType 2 def\n"; ! out << " EUCFont /WMode known\n"; ! out << " { EUCFont /WMode get /WMode exch def }\n"; ! out << " { /WMode 0 def } ifelse\n"; ! out << " /FDepVector [\n"; ! out << " EUCFont /FDepVector get 0 get\n"; ! out << " [ 16#21 1 16#28 {} for 16#30 1 16#74 {} for ]\n"; ! out << " {\n"; ! out << " 13 dict begin\n"; ! out << " /EUCFont EUCFont def\n"; ! out << " /UpperByte exch 16#80 add def \n"; ! out << " % /FontName\n"; ! out << " /FontInfo (EUC lower byte font) readonly def\n"; ! out << " /PaintType 0 def\n"; ! out << " /FontType 3 def\n"; ! out << " /FontMatrix matrix def\n"; ! out << " /FontBBox {0 0 0 0} def\n"; ! out << " /Encoding\n"; ! out << " fixeucfont_dict /LowerByteEncoding get def\n"; ! out << " % /UniqueID\n"; ! out << " % /WMode\n"; ! out << " /BuildChar {\n"; ! out << " gsave\n"; ! out << " exch dup /EUCFont get setfont\n"; ! out << " /UpperByte get\n"; ! out << " 2 string\n"; ! out << " dup 0 4 -1 roll put\n"; ! out << " dup 1 4 -1 roll put\n"; ! out << " dup stringwidth setcharwidth\n"; ! out << " 0 0 moveto show\n"; ! out << " grestore\n"; ! out << " } bind def\n"; ! out << " currentdict\n"; ! out << " end\n"; ! out << " /lowerbytefont exch definefont\n"; ! out << " } forall\n"; ! out << " ] def\n"; ! out << " currentdict\n"; out << " end\n"; out << " /eucfont exch definefont\n"; out << " exch\n";