[gs-cvs] rev 8185 - in trunk/gs: examples examples/cjk lib lib/cjkv src

till at ghostscript.com till at ghostscript.com
Mon Aug 13 03:08:08 PDT 2007


Author: till
Date: 2007-08-13 03:08:05 -0700 (Mon, 13 Aug 2007)
New Revision: 8185

Added:
   trunk/gs/examples/cjk/
   trunk/gs/examples/cjk/all_ac1.ps
   trunk/gs/examples/cjk/all_ag1.ps
   trunk/gs/examples/cjk/all_aj1.ps
   trunk/gs/examples/cjk/all_aj2.ps
   trunk/gs/examples/cjk/all_ak1.ps
   trunk/gs/examples/cjk/article9.ps
   trunk/gs/examples/cjk/gscjk_ac.ps
   trunk/gs/examples/cjk/gscjk_ag.ps
   trunk/gs/examples/cjk/gscjk_aj.ps
   trunk/gs/examples/cjk/gscjk_ak.ps
   trunk/gs/examples/cjk/iso2022.ps
   trunk/gs/lib/cjkv/
   trunk/gs/lib/cjkv/baseutil.ps
   trunk/gs/lib/cjkv/cjkcidcm.ps
   trunk/gs/lib/cjkv/cjkfnmap.ps
   trunk/gs/lib/cjkv/cjkvinit.ps
   trunk/gs/lib/cjkv/cjkvttcf.ps
   trunk/gs/lib/cjkv/tt11util.ps
   trunk/gs/lib/cjkv/tt42util.ps
Modified:
   trunk/gs/lib/gs_cidtt.ps
   trunk/gs/lib/gs_init.ps
   trunk/gs/src/gstype42.c
   trunk/gs/src/gxfont42.h
   trunk/gs/src/unixinst.mak
   trunk/gs/src/zchar1.c
   trunk/gs/src/zchar42.c
Log:
Added CJK patches from Koji Otani


Added: trunk/gs/examples/cjk/all_ac1.ps
===================================================================
--- trunk/gs/examples/cjk/all_ac1.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/all_ac1.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,221 @@
+%!PS-Adobe-3.0
+%%Title: Adobe-CNS1 CID-Keyed Fonts Character List
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%Version: 1.0
+%
+% Usage:
+%   gs [-sF=MOESung-Regular] [-daffix [-sAF=MSung-Light]] \
+%      [-dglyphshow- [-sI=Identity-H]] [-ddescent=200] all_ac1.ps
+%
+%%DocumentMedia: A4 595 842 0 white ()
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/*CIDFont*findresource {
+  dup /CIDFont resourcestatus { pop pop /CIDFont findresource } {
+    notice*page begin
+      *open
+      (Error in /CIDFont findresource: ) *echo-n dup *echo
+      *close
+    end
+    /CIDFont findresource
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+
+/title (Adobe-CNS1 CID-Keyed Fonts Character List) def
+/PW 595 def
+/PH 842 def
+/LM 78 def
+/TM 130 def
+/RM 47 def
+/BM 76 def
+/NH 10 def
+/NV 12 def
+/RW PW LM RM add sub NH div def
+/RH PH TM BM add sub NV div def
+/FS RW 3 mul 4 div def
+/AFS RW 1 mul 4 div def
+/unknowndef { exch dup where { pop pop pop } { exch def } ifelse } bind def
+/F (MKai-Medium) unknowndef
+/affix false unknowndef
+%/AF (MOESung-Regular) unknowndef
+%/AF (MOEKai-Regular) unknowndef
+/AF (MSung-Light) unknowndef
+%/AF (MHei-Medium) unknowndef
+/descent 130 unknowndef
+/glyphshow- false unknowndef
+/fss { exch /CIDFont findresource exch scalefont setfont } bind def
+/concats { % [str ...] concats str
+  () exch dup length 1 sub -1 0 {
+    1 index exch get dup type /stringtype ne { dup length string cvs } if
+    3 -1 roll exch dup length 2 index length add string
+    dup dup 4 2 roll copy length 4 -1 roll putinterval exch
+  } for pop
+} bind def
+/composefontname { % font cmap composefontname font--cmap
+  [ 2 index (--) 3 index ] concats dup 3 -1 roll [ 5 -1 roll ] composefont pop
+} bind def
+glyphshow- {
+  /I (Identity-H) unknowndef
+  /F F I composefontname def
+  affix { /AF AF I composefontname def } if
+  /fss { exch findfont exch scalefont setfont } bind def
+  /s 2 string def
+} if
+/glyphframe { % h oldx glyphframe -
+  gsave 0 setlinewidth
+  currentpoint pop sub exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/box { % llx lly urx ury box -
+  3 index 3 index moveto exch 4 -1 roll sub 3 1 roll exch sub
+  currentpoint 4 -2 roll rectstroke
+} bind def
+/charframe { % h string charframe -
+  gsave 0 setlinewidth
+  stringwidth pop exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/pathframe { % string pathframe -
+  gsave 0 setlinewidth
+  true charpath flattenpath pathbbox box grestore
+} bind def
+/np {
+  /Helvetica findfont 11 scalefont setfont
+  LM BM 11 2 mul sub moveto title show ( - ) show F show
+  affix {
+    gsave /Helvetica findfont 5 scalefont setfont ( and ) show AF show grestore
+  } if
+  PW RM sub BM 11 2 mul sub moveto p 3 string cvs show
+  /p p 1 add def
+  showpage
+  /x LM def
+  /y PH TM sub def
+} bind def
+/nb {
+  /x x RW add def
+  x PW RM sub ge {
+    /x LM def
+    /y y RH sub def
+    y BM le {
+      np
+      /y PH TM sub def
+    } if
+  } if
+} bind def
+%%EndProlog
+/x LM def
+/y PH TM sub def
+/p 1 def
+[
+  %[0 14098]	% Adobe-CNS1-0
+  %[0 17407]	% Adobe-CNS1-0,1
+  %[0 17600]	% Adobe-CNS1-0,1,2
+  %[0 18845]	% Adobe-CNS1-0,1,2,3
+  [0 18961]	% Adobe-CNS1-0,1,2,3,4
+] {
+  cvx exec 1 exch {
+    /id exch def
+    F FS fss
+    x y FS sub moveto
+    glyphshow- not {
+      id glyphshow
+      FS x glyphframe
+    } {
+      s 0 id 256 idiv put s 1 id 256 mod put
+      FS s charframe
+      s pathframe
+      s show
+    } ifelse
+    affix {
+      AF AFS fss
+      x FS add y FS sub moveto
+      glyphshow- not {
+        id glyphshow
+        AFS x FS add glyphframe
+      } {
+        AFS s charframe
+        s pathframe
+        s show
+      } ifelse
+    } if
+    %
+    /Times-Roman findfont 7 scalefont setfont
+    x y FS sub FS descent mul 1000 div sub 7 sub moveto
+    id 5 string cvs show
+    nb
+  } for
+  np
+} forall
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/all_ag1.ps
===================================================================
--- trunk/gs/examples/cjk/all_ag1.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/all_ag1.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,218 @@
+%!PS-Adobe-3.0
+%%Title: Adobe-GB1 CID-Keyed Fonts Character List
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%Version: 1.0
+%
+% Usage:
+%   gs [-sF=BousungEG-Light-GB] [-daffix [-sAF=STSong-Light]] \
+%      [-dglyphshow- [-sI=Identity-H]] [-ddescent=200] all_ag1.ps
+%
+%%DocumentMedia: A4 595 842 0 white ()
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/*CIDFont*findresource {
+  dup /CIDFont resourcestatus { pop pop /CIDFont findresource } {
+    notice*page begin
+      *open
+      (Error in /CIDFont findresource: ) *echo-n dup *echo
+      *close
+    end
+    /CIDFont findresource
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+
+/title (Adobe-GB1 CID-Keyed Fonts Character List) def
+/PW 595 def
+/PH 842 def
+/LM 78 def
+/TM 130 def
+/RM 47 def
+/BM 76 def
+/NH 10 def
+/NV 12 def
+/RW PW LM RM add sub NH div def
+/RH PH TM BM add sub NV div def
+/FS RW 3 mul 4 div def
+/AFS RW 1 mul 4 div def
+/unknowndef { exch dup where { pop pop pop } { exch def } ifelse } bind def
+/F (STHeiti-Regular) unknowndef
+/affix false unknowndef
+/AF (STSong-Light) unknowndef
+/descent 130 unknowndef
+/glyphshow- false unknowndef
+/fss { exch *CIDFont*findresource exch scalefont setfont } bind def
+/concats { % [str ...] concats str
+  () exch dup length 1 sub -1 0 {
+    1 index exch get dup type /stringtype ne { dup length string cvs } if
+    3 -1 roll exch dup length 2 index length add string
+    dup dup 4 2 roll copy length 4 -1 roll putinterval exch
+  } for pop
+} bind def
+/composefontname { % font cmap composefontname font--cmap
+  [ 2 index (--) 3 index ] concats dup 3 -1 roll [ 5 -1 roll ] composefont pop
+} bind def
+glyphshow- {
+  /I (Identity-H) unknowndef
+  /F F I composefontname def
+  affix { /AF AF I composefontname def } if
+  /fss { exch *findfont exch scalefont setfont } bind def
+  /s 2 string def
+} if
+/glyphframe { % h oldx glyphframe -
+  gsave 0 setlinewidth
+  currentpoint pop sub exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/box { % llx lly urx ury box -
+  3 index 3 index moveto exch 4 -1 roll sub 3 1 roll exch sub
+  currentpoint 4 -2 roll rectstroke
+} bind def
+/charframe { % h string charframe -
+  gsave 0 setlinewidth
+  stringwidth pop exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/pathframe { % string pathframe -
+  gsave 0 setlinewidth
+  true charpath flattenpath pathbbox box grestore
+} bind def
+/np {
+  /Helvetica findfont 11 scalefont setfont
+  LM BM 11 2 mul sub moveto title show ( - ) show F show
+  affix {
+    gsave /Helvetica findfont 5 scalefont setfont ( and ) show AF show grestore
+  } if
+  PW RM sub BM 11 2 mul sub moveto p 3 string cvs show
+  /p p 1 add def
+  showpage
+  /x LM def
+  /y PH TM sub def
+} bind def
+/nb {
+  /x x RW add def
+  x PW RM sub ge {
+    /x LM def
+    /y y RH sub def
+    y BM le {
+      np
+      /y PH TM sub def
+    } if
+  } if
+} bind def
+%%EndProlog
+/x LM def
+/y PH TM sub def
+/p 1 def
+[
+  %[0 7716]	% Adobe-GB1-0
+  %[0 9896]	% Adobe-GB1-0,1
+  %[0 22126]	% Adobe-GB1-0,1,2
+  %[0 22352]	% Adobe-GB1-0,1,2,3
+  [0 29063]	% Adobe-GB1-0,1,2,3,4
+] {
+  cvx exec 1 exch {
+    /id exch def
+    F FS fss
+    x y FS sub moveto
+    glyphshow- not {
+      id glyphshow
+      FS x glyphframe
+    } {
+      s 0 id 256 idiv put s 1 id 256 mod put
+      FS s charframe
+      s pathframe
+      s show
+    } ifelse
+    affix {
+      AF AFS fss
+      x FS add y FS sub moveto
+      glyphshow- not {
+        id glyphshow
+        AFS x FS add glyphframe
+      } {
+        AFS s charframe
+        s pathframe
+        s show
+      } ifelse
+    } if
+    %
+    /Times-Roman findfont 7 scalefont setfont
+    x y FS sub FS descent mul 1000 div sub 7 sub moveto
+    id 5 string cvs show
+    nb
+  } for
+  np
+} forall
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/all_aj1.ps
===================================================================
--- trunk/gs/examples/cjk/all_aj1.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/all_aj1.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,218 @@
+%!PS-Adobe-3.0
+%%Title: Adobe-Japan1 CID-Keyed Fonts Character List
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%Version: 1.0
+%
+% Usage:
+%   gs [-sF=WadaMin-Regular] [-daffix [-sAF=HeiseiMin-W3]] \
+%      [-dglyphshow- [-sI=Identity-H]] [-ddescent=200] all_aj1.ps
+%
+%%DocumentMedia: A4 595 842 0 white ()
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/*CIDFont*findresource {
+  dup /CIDFont resourcestatus { pop pop /CIDFont findresource } {
+    notice*page begin
+      *open
+      (Error in /CIDFont findresource: ) *echo-n dup *echo
+      *close
+    end
+    /CIDFont findresource
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+
+/title (Adobe-Japan1 CID-Keyed Fonts Character List) def
+/PW 595 def
+/PH 842 def
+/LM 78 def
+/TM 130 def
+/RM 47 def
+/BM 76 def
+/NH 10 def
+/NV 12 def
+/RW PW LM RM add sub NH div def
+/RH PH TM BM add sub NV div def
+/FS RW 3 mul 4 div def
+/AFS RW 1 mul 4 div def
+/unknowndef { exch dup where { pop pop pop } { exch def } ifelse } bind def
+/F (HeiseiKakuGo-W5) unknowndef
+/affix false unknowndef
+/AF (HeiseiMin-W3) unknowndef
+/descent 130 unknowndef
+/glyphshow- false unknowndef
+/fss { exch *CIDFont*findresource exch scalefont setfont } bind def
+/concats { % [str ...] concats str
+  () exch dup length 1 sub -1 0 {
+    1 index exch get dup type /stringtype ne { dup length string cvs } if
+    3 -1 roll exch dup length 2 index length add string
+    dup dup 4 2 roll copy length 4 -1 roll putinterval exch
+  } for pop
+} bind def
+/composefontname { % font cmap composefontname font--cmap
+  [ 2 index (--) 3 index ] concats dup 3 -1 roll [ 5 -1 roll ] composefont pop
+} bind def
+glyphshow- {
+  /I (Identity-H) unknowndef
+  /F F I composefontname def
+  affix { /AF AF I composefontname def } if
+  /fss { exch *findfont exch scalefont setfont } bind def
+  /s 2 string def
+} if
+/glyphframe { % h oldx glyphframe -
+  gsave 0 setlinewidth
+  currentpoint pop sub exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/box { % llx lly urx ury box -
+  3 index 3 index moveto exch 4 -1 roll sub 3 1 roll exch sub
+  currentpoint 4 -2 roll rectstroke
+} bind def
+/charframe { % h string charframe -
+  gsave 0 setlinewidth
+  stringwidth pop exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/pathframe { % string pathframe -
+  gsave 0 setlinewidth
+  true charpath flattenpath pathbbox box grestore
+} bind def
+/np {
+  /Helvetica findfont 11 scalefont setfont
+  LM BM 11 2 mul sub moveto title show ( - ) show F show
+  affix {
+    gsave /Helvetica findfont 5 scalefont setfont ( and ) show AF show grestore
+  } if
+  PW RM sub BM 11 2 mul sub moveto p 3 string cvs show
+  /p p 1 add def
+  showpage
+  /x LM def
+  /y PH TM sub def
+} bind def
+/nb {
+  /x x RW add def
+  x PW RM sub ge {
+    /x LM def
+    /y y RH sub def
+    y BM le {
+      np
+      /y PH TM sub def
+    } if
+  } if
+} bind def
+%%EndProlog
+/x LM def
+/y PH TM sub def
+/p 1 def
+[
+  [0 8283]	% Adobe-Japan1-0
+  [8284 8358]	% Adobe-Japan1-1
+  [8359 8719]	% Adobe-Japan1-2
+  [8720 9353]	% Adobe-Japan1-3
+  [9354 15443]	% Adobe-Japan1-4
+] {
+  cvx exec 1 exch {
+    /id exch def
+    F FS fss
+    x y FS sub moveto
+    glyphshow- not {
+      id glyphshow
+      FS x glyphframe
+    } {
+      s 0 id 256 idiv put s 1 id 256 mod put
+      FS s charframe
+      s pathframe
+      s show
+    } ifelse
+    affix {
+      AF AFS fss
+      x FS add y FS sub moveto
+      glyphshow- not {
+        id glyphshow
+        AFS x FS add glyphframe
+      } {
+        AFS s charframe
+        s pathframe
+        s show
+      } ifelse
+    } if
+    %
+    /Times-Roman findfont 7 scalefont setfont
+    x y FS sub FS descent mul 1000 div sub 7 sub moveto
+    id 5 string cvs show
+    nb
+  } for
+  np
+} forall
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/all_aj2.ps
===================================================================
--- trunk/gs/examples/cjk/all_aj2.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/all_aj2.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,214 @@
+%!PS-Adobe-3.0
+%%Title: Adobe-Japan2 CID-Keyed Fonts Character List
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%Version: 1.0
+%
+% Usage:
+%   gs [-sF=HeiseiMin-W3H] [-daffix [-sAF=WadaMin-RegularH]] \
+%      [-dglyphshow- [-sI=Identity-H]] [-ddescent=200] all_aj2.ps
+%
+%%DocumentMedia: A4 595 842 0 white ()
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/*CIDFont*findresource {
+  dup /CIDFont resourcestatus { pop pop /CIDFont findresource } {
+    notice*page begin
+      *open
+      (Error in /CIDFont findresource: ) *echo-n dup *echo
+      *close
+    end
+    /CIDFont findresource
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+
+/title (Adobe-Japan2 CID-Keyed Fonts Character List) def
+/PW 595 def
+/PH 842 def
+/LM 78 def
+/TM 130 def
+/RM 47 def
+/BM 76 def
+/NH 10 def
+/NV 12 def
+/RW PW LM RM add sub NH div def
+/RH PH TM BM add sub NV div def
+/FS RW 3 mul 4 div def
+/AFS RW 1 mul 4 div def
+/unknowndef { exch dup where { pop pop pop } { exch def } ifelse } bind def
+/F (WadaMin-RegularH) unknowndef
+/affix false unknowndef
+/AF (HeiseiMin-W3H) unknowndef
+/descent 130 unknowndef
+/glyphshow- false unknowndef
+/fss { exch *CIDFont*findresource exch scalefont setfont } bind def
+/concats { % [str ...] concats str
+  () exch dup length 1 sub -1 0 {
+    1 index exch get dup type /stringtype ne { dup length string cvs } if
+    3 -1 roll exch dup length 2 index length add string
+    dup dup 4 2 roll copy length 4 -1 roll putinterval exch
+  } for pop
+} bind def
+/composefontname { % font cmap composefontname font--cmap
+  [ 2 index (--) 3 index ] concats dup 3 -1 roll [ 5 -1 roll ] composefont pop
+} bind def
+glyphshow- {
+  /I (Identity-H) unknowndef
+  /F F I composefontname def
+  affix { /AF AF I composefontname def } if
+  /fss { exch *findfont exch scalefont setfont } bind def
+  /s 2 string def
+} if
+/glyphframe { % h oldx glyphframe -
+  gsave 0 setlinewidth
+  currentpoint pop sub exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/box { % llx lly urx ury box -
+  3 index 3 index moveto exch 4 -1 roll sub 3 1 roll exch sub
+  currentpoint 4 -2 roll rectstroke
+} bind def
+/charframe { % h string charframe -
+  gsave 0 setlinewidth
+  stringwidth pop exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/pathframe { % string pathframe -
+  gsave 0 setlinewidth
+  true charpath flattenpath pathbbox box grestore
+} bind def
+/np {
+  /Helvetica findfont 11 scalefont setfont
+  LM BM 11 2 mul sub moveto title show ( - ) show F show
+  affix {
+    gsave /Helvetica findfont 5 scalefont setfont ( and ) show AF show grestore
+  } if
+  PW RM sub BM 11 2 mul sub moveto p 3 string cvs show
+  /p p 1 add def
+  showpage
+  /x LM def
+  /y PH TM sub def
+} bind def
+/nb {
+  /x x RW add def
+  x PW RM sub ge {
+    /x LM def
+    /y y RH sub def
+    y BM le {
+      np
+      /y PH TM sub def
+    } if
+  } if
+} bind def
+%%EndProlog
+/x LM def
+/y PH TM sub def
+/p 1 def
+[
+  [0 6067]	% Adobe-Japan2-0
+] {
+  cvx exec 1 exch {
+    /id exch def
+    F FS fss
+    x y FS sub moveto
+    glyphshow- not {
+      id glyphshow
+      FS x glyphframe
+    } {
+      s 0 id 256 idiv put s 1 id 256 mod put
+      FS s charframe
+      s pathframe
+      s show
+    } ifelse
+    affix {
+      AF AFS fss
+      x FS add y FS sub moveto
+      glyphshow- not {
+        id glyphshow
+        AFS x FS add glyphframe
+      } {
+        AFS s charframe
+        s pathframe
+        s show
+      } ifelse
+    } if
+    %
+    /Times-Roman findfont 7 scalefont setfont
+    x y FS sub FS descent mul 1000 div sub 7 sub moveto
+    id 5 string cvs show
+    nb
+  } for
+  np
+} forall
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/all_ak1.ps
===================================================================
--- trunk/gs/examples/cjk/all_ak1.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/all_ak1.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,215 @@
+%!PS-Adobe-3.0
+%%Title: Adobe-Korea1 CID-Keyed Fonts Character List
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%Version: 1.0
+%
+% Usage:
+%   gs [-sF=MunhwaGothic-Regular] [-daffix [-sAF=HYGoThic-Medium]] \
+%      [-dglyphshow- [-sI=Identity-H]] [-ddescent=200] all_ak1.ps
+%
+%%DocumentMedia: A4 595 842 0 white ()
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/*CIDFont*findresource {
+  dup /CIDFont resourcestatus { pop pop /CIDFont findresource } {
+    notice*page begin
+      *open
+      (Error in /CIDFont findresource: ) *echo-n dup *echo
+      *close
+    end
+    /CIDFont findresource
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+
+/title (Adobe-Korea1 CID-Keyed Fonts Character List) def
+/PW 595 def
+/PH 842 def
+/LM 78 def
+/TM 130 def
+/RM 47 def
+/BM 76 def
+/NH 10 def
+/NV 12 def
+/RW PW LM RM add sub NH div def
+/RH PH TM BM add sub NV div def
+/FS RW 3 mul 4 div def
+/AFS RW 1 mul 4 div def
+/unknowndef { exch dup where { pop pop pop } { exch def } ifelse } bind def
+/F (HYGoThic-Medium) unknowndef
+/affix false unknowndef
+/AF (HYSMyeongJo-Medium) unknowndef
+/descent 130 unknowndef
+/glyphshow- false unknowndef
+/fss { exch *CIDFont*findresource exch scalefont setfont } bind def
+/concats { % [str ...] concats str
+  () exch dup length 1 sub -1 0 {
+    1 index exch get dup type /stringtype ne { dup length string cvs } if
+    3 -1 roll exch dup length 2 index length add string
+    dup dup 4 2 roll copy length 4 -1 roll putinterval exch
+  } for pop
+} bind def
+/composefontname { % font cmap composefontname font--cmap
+  [ 2 index (--) 3 index ] concats dup 3 -1 roll [ 5 -1 roll ] composefont pop
+} bind def
+glyphshow- {
+  /I (Identity-H) unknowndef
+  /F F I composefontname def
+  affix { /AF AF I composefontname def } if
+  /fss { exch *findfont exch scalefont setfont } bind def
+  /s 2 string def
+} if
+/glyphframe { % h oldx glyphframe -
+  gsave 0 setlinewidth
+  currentpoint pop sub exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/box { % llx lly urx ury box -
+  3 index 3 index moveto exch 4 -1 roll sub 3 1 roll exch sub
+  currentpoint 4 -2 roll rectstroke
+} bind def
+/charframe { % h string charframe -
+  gsave 0 setlinewidth
+  stringwidth pop exch dup 0 exch descent mul 1000 div neg rmoveto
+  currentpoint 4 -2 roll rectstroke grestore
+} bind def
+/pathframe { % string pathframe -
+  gsave 0 setlinewidth
+  true charpath flattenpath pathbbox box grestore
+} bind def
+/np {
+  /Helvetica findfont 11 scalefont setfont
+  LM BM 11 2 mul sub moveto title show ( - ) show F show
+  affix {
+    gsave /Helvetica findfont 5 scalefont setfont ( and ) show AF show grestore
+  } if
+  PW RM sub BM 11 2 mul sub moveto p 3 string cvs show
+  /p p 1 add def
+  showpage
+  /x LM def
+  /y PH TM sub def
+} bind def
+/nb {
+  /x x RW add def
+  x PW RM sub ge {
+    /x LM def
+    /y y RH sub def
+    y BM le {
+      np
+      /y PH TM sub def
+    } if
+  } if
+} bind def
+%%EndProlog
+/x LM def
+/y PH TM sub def
+/p 1 def
+[
+  [0 9332]	% Adobe-Korea1-0
+  [9333 18351]	% Adobe-Korea1-1,2
+] {
+  cvx exec 1 exch {
+    /id exch def
+    F FS fss
+    x y FS sub moveto
+    glyphshow- not {
+      id glyphshow
+      FS x glyphframe
+    } {
+      s 0 id 256 idiv put s 1 id 256 mod put
+      FS s charframe
+      s pathframe
+      s show
+    } ifelse
+    affix {
+      AF AFS fss
+      x FS add y FS sub moveto
+      glyphshow- not {
+        id glyphshow
+        AFS x FS add glyphframe
+      } {
+        AFS s charframe
+        s pathframe
+        s show
+      } ifelse
+    } if
+    %
+    /Times-Roman findfont 7 scalefont setfont
+    x y FS sub FS descent mul 1000 div sub 7 sub moveto
+    id 5 string cvs show
+    nb
+  } for
+  np
+} forall
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/article9.ps
===================================================================
--- trunk/gs/examples/cjk/article9.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/article9.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,103 @@
+%!PS-Adobe-2.0
+%
+% Article 9 of the Constitution of Japan 
+% written in vertical direction using ...
+%	Fonts:
+%		Ryumin-Light-V, GothicBBB-Medium-V
+%	Operators for characters:
+%		show, widthshow, ashow, stringwidth, charpath, cshow
+
+% (lib/cjkv/cjk_ttf.ps) runlibfile
+% (lib/cjkv/cjkfnmap.ps) runlibfile
+% /Ryumin-Light      (Resource/FreeTT/sazanami-mincho.ttf) .openttcidfont /CIDFont defineresource pop
+% /GothicBBB-Medium  (Resource/FreeTT/sazanami-gothic.ttf) .openttcidfont /CIDFont defineresource pop
+
+
+% constants
+
+/RIGHT	550 def
+/WIDTH	500 def
+/TOP	750 def
+/HEIGHT	700 def
+/SIZE	 20 def
+/MARGIN	 40 def
+
+% utility operators
+
+/GOTHIC { /GothicBBB-Medium-V findfont exch dup
+	  /FONTSIZE exch def scalefont setfont } def
+/RYUMIN { /Ryumin-Light-V findfont exch dup
+	  /FONTSIZE exch def scalefont setfont } def
+/NEXTLINE { currentpoint pop FONTSIZE 1.8 mul sub TOP MARGIN sub moveto } def
+
+/MARU { dup gsave false charpath flattenpath pathbbox grestore
+	/ury exch def /urx exch def /lly exch def /llx exch def
+	gsave llx urx add 2 div lly ury add 2 div translate 
+	urx llx sub ury lly sub 2 copy gt { pop }{ exch pop }ifelse 
+	1.2 mul dup scale 0 setlinewidth
+	0.5 0 moveto 0 0 0.5 0 360 arc stroke grestore show } def
+/STRLEN { 0 exch { pop pop pop 1 add } exch cshow } def
+/JUSTIFY { dup STRLEN 1 sub 1 index stringwidth exch pop 
+	   currentpoint exch pop add TOP HEIGHT MARGIN sub sub sub
+	   exch div neg 0 exch 3 -1 roll ashow } def
+
+% initialize
+
+RIGHT TOP moveto 0 HEIGHT neg rlineto WIDTH neg 0 rlineto 0 HEIGHT rlineto
+closepath stroke
+
+RIGHT MARGIN sub TOP MARGIN sub moveto
+
+% title
+
+SIZE 2 mul GOTHIC
+<2121467C4B5C3971377B4B21> show
+NEXTLINE
+
+% chapter
+
+SIZE 1.5 mul GOTHIC
+<21212121426846733E4F2121> show
+
+SIZE 1.5 mul RYUMIN
+<406F4168244E4A7C347E> show
+NEXTLINE
+
+% abstract
+
+SIZE GOTHIC
+0 SIZE 2 div 16#2122 <2121214C406F4168244E4A7C347E2122406F4E4F244E49544A5D3B7D
+21223872406F3822244E485D4727214D> widthshow
+NEXTLINE
+
+% sentence
+
+SIZE GOTHIC
+<426836653E72> show
+SIZE RYUMIN
+<2331> MARU
+<2121467C4B5C39714C31244F212240353541244843613D7824723470443424482439246B39713A
+5D> JUSTIFY
+NEXTLINE
+
+<4A3F4F422472403F3C42244B347535612437212239713822244E482F4630243F246B406F416824
+48212249704E4F244B2468246B> JUSTIFY
+NEXTLINE
+
+<305233454B74244F49704E4F244E39543B48244F212239713A5D4A364168247232723768243924
+6B3C6A434A244824372446> JUSTIFY
+NEXTLINE
+
+<244F2122314A3557244B2433246C24724A7C347E2439246B2123> show
+NEXTLINE
+
+<2332> MARU
+<212141303960244E4C5C452A247243232439246B243F246121224E26332436753733243D244E42
+3E244E406F4E4F> JUSTIFY
+NEXTLINE
+
+<244F21222433246C24724A5D3B7D2437244A242421233971244E3872406F3822244F2122243324
+6C247247272461244A24242123> show
+NEXTLINE
+
+showpage

Added: trunk/gs/examples/cjk/gscjk_ac.ps
===================================================================
--- trunk/gs/examples/cjk/gscjk_ac.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/gscjk_ac.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,120 @@
+%!PS-Adobe-3.0
+%%Title: chinese-big5 encoding
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%BoundingBox: 30 150 530 650
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+%%EndProlog
+/MSung-Light--B5-V *findfont 25 scalefont setfont
+500 625 moveto
+(ÆFµ§¤¤¤åÁcÅé¦rª½¼g¦L¨ê) show
+/MSung-Light--B5-H *findfont 25 scalefont setfont
+50 600 moveto
+(ÆFµ§ Ghostscript) show
+50 550 moveto
+(¤¤¤åÁcÅé¦r Traditional Chinese) show
+50 500 moveto
+(¾î¼g horizontal writing) show
+50 450 moveto
+(¦L¨ê Print) show
+%
+/MSung-Light--B5-V *findfont [ 1 .3 0 1 0 0 ] makefont 20 scalefont setfont
+100 275 moveto 20 2 div 0 rmoveto
+(±×Åé) dup stringwidth neg rmoveto show
+/MSung-Light--B5-H *findfont [ 1 0 .3 1 0 0 ] makefont 20 scalefont setfont
+100 250 moveto
+(±×Åé Italic transformation) show
+%
+/MSung-Light--B5-H *findfont 20 scalefont setfont
+150 400 moveto
+(Sung Typeface §ºÅé) show
+/MSung-Medium--B5-H *findfont 20 scalefont setfont
+150 375 moveto
+(Sung Medium Typeface ¤¤§ºÅé) show
+/MHei-Medium--B5-H *findfont 20 scalefont setfont
+150 350 moveto
+(Hei Typeface ¶ÂÅé) show
+/MKai-Medium--B5-H *findfont 20 scalefont setfont
+150 325 moveto
+(Kai Typeface ´{Åé) show
+%
+/Times-Roman findfont 13 scalefont setfont
+50 200 moveto
+(* Chinese translation of "Ghostscript" is merely associative \
+characters of these meanings.) show
+50 200 13 sub moveto
+(In Traditional Chinese articles, customarily we use just \
+"Ghostscript" as it is.) show
+showpage
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/gscjk_ag.ps
===================================================================
--- trunk/gs/examples/cjk/gscjk_ag.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/gscjk_ag.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,120 @@
+%!PS-Adobe-3.0
+%%Title: euc-china encoding
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%BoundingBox: 30 150 530 650
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+%%EndProlog
+/STSong-Light--GB-EUC-V *findfont 25 scalefont setfont
+500 625 moveto
+(Áé±ÊÖÐÎļòÌå×Öֱдӡˢ) show
+/STSong-Light--GB-EUC-H *findfont 25 scalefont setfont
+50 600 moveto
+(Áé±Ê Ghostscript) show	
+50 550 moveto
+(ÖÐÎļòÌå×Ö Simplified Chinese) show
+50 500 moveto
+(ºáд horizontal writing) show
+50 450 moveto
+(Ó¡Ë¢ Print) show
+%
+/STSong-Light--GB-EUC-V *findfont [ 1 .3 0 1 0 0 ] makefont 20 scalefont setfont
+100 275 moveto 20 2 div 0 rmoveto
+(бÌå) dup stringwidth neg rmoveto show
+/STSong-Light--GB-EUC-H *findfont [ 1 0 .3 1 0 0 ] makefont 20 scalefont setfont
+100 250 moveto
+(бÌå Italic transformation) show
+%
+/STSong-Light--GB-EUC-H *findfont 20 scalefont setfont
+150 400 moveto
+(Song Typeface ËÎÌå) show
+/STFangsong-Light--GB-EUC-H *findfont 20 scalefont setfont
+150 375 moveto
+(Fangsong Typeface ·ÂËÎÌå) show
+/STHeiti-Regular--GB-EUC-H *findfont 20 scalefont setfont
+150 350 moveto
+(Hei Typeface ºÚÌå) show
+/STKaiti-Regular--GB-EUC-H *findfont 20 scalefont setfont
+150 325 moveto
+(Kai Typeface ¿«Ìå) show
+%
+/Times-Roman findfont 13 scalefont setfont
+50 200 moveto
+(* Chinese translation of "Ghostscript" is merely associative \
+characters of these meanings.) show
+50 200 13 sub moveto
+(In Simplified Chinese articles, customarily we use just "Ghostscript" \
+as it is.) show
+showpage
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/gscjk_aj.ps
===================================================================
--- trunk/gs/examples/cjk/gscjk_aj.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/gscjk_aj.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,114 @@
+%!PS-Adobe-3.0
+%%Title: japanese-shift-jis encoding
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%BoundingBox: 30 150 530 650
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+%%EndProlog
+/Ryumin-Light-RKSJ-V *findfont 25 scalefont setfont
+500 625 moveto
+(—ì•M “ú–{Œê c‘‚« ˆóü) show
+/Ryumin-Light-RKSJ-H *findfont 25 scalefont setfont
+50 600 moveto
+(—ì•M Ghostscript) show
+50 550 moveto
+(“ú–{Œê Japanese) show
+50 500 moveto
+(‰¡‘‚« horizontal writing) show
+50 450 moveto
+(ˆóü Print) show
+%
+/Ryumin-Light-RKSJ-V *findfont [ 1 .3 0 1 0 0 ] makefont 20 scalefont setfont
+100 275 moveto 20 2 div 0 rmoveto
+(ŽÎ‘Ì) dup stringwidth neg rmoveto show
+/Ryumin-Light-RKSJ-H *findfont [ 1 0 .3 1 0 0 ] makefont 20 scalefont setfont
+100 250 moveto
+(ŽÎ‘Ì Italic transformation) show
+%
+/Ryumin-Light-RKSJ-H *findfont 20 scalefont setfont
+150 400 moveto
+(Mincho Typeface –¾’©‘Ì) show
+/GothicBBB-Medium-RKSJ-H *findfont 20 scalefont setfont
+150 375 moveto
+(Gothic Typeface ƒSƒVƒbƒN‘Ì) show
+%
+/Times-Roman findfont 13 scalefont setfont
+50 200 moveto
+(* Japanese translation of "Ghostscript" is merely associative \
+characters of these meanings.) show
+50 200 13 sub moveto
+(In Japanese articles, customarily we use just "Ghostscript" as it \
+is.) show
+showpage
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/gscjk_ak.ps
===================================================================
--- trunk/gs/examples/cjk/gscjk_ak.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/gscjk_ak.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,116 @@
+%!PS-Adobe-3.0
+%%Title: euc-korea encoding
+%%Creator: Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU General Public License. See the file COPYING
+%%+ for more information.
+%%BoundingBox: 30 150 530 650
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+%%EndProlog
+/HYSMyeongJo-Medium--KSC-EUC-V *findfont 25 scalefont setfont
+500 625 moveto
+(ÖÄù¶ Çѱ¹¾î ¼¼·Î¾²±â Àμâ) show
+/HYSMyeongJo-Medium--KSC-EUC-H *findfont 25 scalefont setfont
+50 600 moveto
+(ÖÄù¶ Ghostscript) show
+50 550 moveto
+(Çѱ¹¾î Korean) show
+50 500 moveto
+(°¡·Î¾²±â horizontal writing) show
+50 450 moveto
+(Àμâ Print) show
+%
+/HYSMyeongJo-Medium--KSC-EUC-V *findfont [ 1 .3 0 1 0 0 ] makefont 20 scalefont setfont
+100 275 moveto 20 2 div 0 rmoveto
+(±â¿ïÀÓ²Ã) dup stringwidth neg rmoveto show
+/HYSMyeongJo-Medium--KSC-EUC-H *findfont [ 1 0 .3 1 0 0 ] makefont 20 scalefont setfont
+100 250 moveto
+(±â¿ïÀӲà Italic transformation) show
+%
+/HYSMyeongJo-Medium--KSC-EUC-H *findfont 20 scalefont setfont
+150 400 moveto
+(MyeongJo Typeface ¸íÁ¶) show
+/HYGoThic-Medium--KSC-EUC-H *findfont 20 scalefont setfont
+150 375 moveto
+(Gothic Typeface °íµñ) show
+/HYRGoThic-Medium--KSC-EUC-H *findfont 20 scalefont setfont
+150 350 moveto
+(Rounded Gothic Typeface µÕ±Ù°íµñ) show
+%
+/Times-Roman findfont 13 scalefont setfont
+50 200 moveto
+(* Korean translation of "Ghostscript" is merely associative \
+characters of these meanings.) show
+50 200 13 sub moveto
+(In Korean articles, customarily we use just "Ghostscript" as it is.) show
+showpage
+%%Trailer
+%%EOF

Added: trunk/gs/examples/cjk/iso2022.ps
===================================================================
--- trunk/gs/examples/cjk/iso2022.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/examples/cjk/iso2022.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,1256 @@
+%!PS-Adobe-3.0
+%%Creator: tops by Taiji Yamada <taiji at aihara.co.jp>
+%%Copyright: 2001 Taiji Yamada <taiji at aihara.co.jp> and gs-cjk project
+%%+ This script is part of GNU Ghostscript and is distributed under
+%%+ the terms of the GNU GPL. See the file COPYING for more information.
+%%+ It is also part of tops, a text filter into PostScript for various
+%%+ languages. To get it, visit http://www.aihara.co.jp/~taiji/tops/#tops
+%%DocumentData: Clean7Bit
+%%DocumentMedia: A4 595 842 0 white ()
+%%Extensions: Composite
+%%Orientation: Portrait
+%%Title: iso-2022-7bit - Emacs/Mule editable PostScript file
+%%Version: 1.0
+%
+% Usage:
+%   gs [-dverttext] iso2022.ps
+%
+%%EndComments
+%%BeginProlog
+
+/*gs-cjk (\
+------------------------------------------------------------------------\n\
+This is a script to test CJK fonts such as CID-keyed fonts.\n\
+If you have not done CID-keyed fonts installation and definitions at\n\
+/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
+this script can't work correctly.\n\
+For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
+
+If you throw this script into a printer, it requires PostScript 3\n\
+printer and CID-keyed fonts specified in this script.\n\
+------------------------------------------------------------------------\n) def
+
+/notice*stdout 4 dict begin
+  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
+  currentdict
+end def
+
+/notice*page 5 dict begin
+  /*y 750 def
+  /*open {
+    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
+    *y 750 eq {
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+    } if
+  } def
+  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
+  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
+  /*close { grestore } def
+  currentdict
+end def
+
+/greeting*gs-cjk {
+  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
+    notice*stdout begin
+      *open
+      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
+      *close
+    end
+  } if } ifelse
+} bind def
+greeting*gs-cjk
+
+/*findfont {
+  dup /Font resourcestatus { pop pop findfont } {
+    notice*page begin
+      *open
+      (Error in findfont: ) *echo-n dup *echo
+      *close
+    end
+    findfont
+  } ifelse
+} bind def
+
+/orighandleerror errordict /handleerror get def
+errordict begin
+  /handleerror {
+    notice*page begin errordict begin $error begin
+      *open
+      (Error of ) *echo-n errorname dup length string cvs *echo
+      *close
+      showpage
+    end end end
+    orighandleerror
+  } bind def
+end
+
+/unknowndef { exch dup where { pop pop pop } { exch def } ifelse } bind def
+
+/ISOLatin1Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin1Encoding)
+%%EndComments
+/ISOLatin1Encoding [ % iso-8859-1
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+% 0xc0
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+% 0xe0
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOLatin2Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin2Encoding)
+%%EndComments
+/ISOLatin2Encoding [ % iso-8859-2
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/Aogonek/breve/Lslash/currency/Lcaron/Sacute/section
+/dieresis/Scaron/Scedilla/Tcaron/Zacute/hyphen/Zcaron/Zdotaccent
+/degree/aogonek/ogonek/lslash/acute/lcaron/sacute/caron
+/cedilla/scaron/scedilla/tcaron/zacute/hungarumlaut/zcaron/zdotaccent
+% 0xc0
+/Racute/Aacute/Acircumflex/Abreve/Adieresis/Lacute/Cacute/Ccedilla
+/Ccaron/Eacute/Eogonek/Edieresis/Ecaron/Iacute/Icircumflex/Dcaron
+/Dcroat/Nacute/Ncaron/Oacute/Ocircumflex/Ohungarumlaut/Odieresis/multiply
+/Rcaron/Uring/Uacute/Uhungarumlaut/Udieresis/Yacute/Tcommaaccent/germandbls
+% 0xe0
+/racute/aacute/acircumflex/abreve/adieresis/lacute/cacute/ccedilla
+/ccaron/eacute/eogonek/edieresis/ecaron/iacute/icircumflex/dcaron
+/dcroat/nacute/ncaron/oacute/ocircumflex/ohungarumlaut/odieresis/divide
+/rcaron/uring/uacute/uhungarumlaut/udieresis/yacute/tcommaaccent/dotaccent
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOLatin3Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin3Encoding)
+%%EndComments
+/ISOLatin3Encoding [ % iso-8859-3
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/Hbar/breve/sterling/currency/.notdef/Hcircumflex/section
+/dieresis/Idotaccent/Scedilla/Gbreve/Jcircumflex/hyphen/.notdef/Zdotaccent
+/degree/hbar/twosuperior/threesuperior/acute/mu/hcircumflex/periodcentered
+/cedilla/dotlessi/scedilla/gbreve/jcircumflex/onehalf/.notdef/zdotaccent
+% 0xc0
+/Agrave/Aacute/Acircumflex/.notdef/Adieresis/Cdotaccent/Ccircumflex/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/.notdef/Ntilde/Ograve/Oacute/Ocircumflex/Gdotaccent/Odieresis/multiply
+/Gcircumflex/Ugrave/Uacute/Ucircumflex/Udieresis/Ubreve/Scircumflex/germandbls
+% 0xe0
+/agrave/aacute/acircumflex/.notdef/adieresis/cdotaccent/ccircumflex/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/.notdef/ntilde/ograve/oacute/ocircumflex/gdotaccent/odieresis/divide
+/gcircumflex/ugrave/uacute/ucircumflex/udieresis/ubreve/scircumflex/dotaccent
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOLatin4Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin4Encoding)
+%%EndComments
+/ISOLatin4Encoding [ % iso-8859-4
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/Aogonek/kgreenlandic/Rcommaaccent/currency/Itilde/Lcommaaccent/section
+/dieresis/Scaron/Emacron/Gcommaaccent/Tbar/hyphen/Zcaron/macron
+/degree/aogonek/ogonek/rcommaaccent/acute/itilde/lcommaaccent/caron
+/cedilla/scaron/emacron/gcommaaccent/tbar/Eng/zcaron/eng
+% 0xc0
+/Amacron/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Iogonek
+/Ccaron/Eacute/Eogonek/Edieresis/Edotaccent/Iacute/Icircumflex/Imacron
+/Dcroat/Ncommaaccent/Omacron/Kcommaaccent/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Uogonek/Uacute/Ucircumflex/Udieresis/Utilde/Umacron/germandbls
+% 0xe0
+/amacron/aacute/acircumflex/atilde/adieresis/aring/ae/iogonek
+/ccaron/eacute/eogonek/edieresis/edotaccent/iacute/icircumflex/imacron
+/dcroat/ncommaaccent/omacron/kcommaaccent/ocircumflex/otilde/odieresis/divide
+/oslash/uogonek/uacute/ucircumflex/udieresis/utilde/umacron/dotaccent
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOCyrillicEncoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOCyrillicEncoding)
+%%EndComments
+/ISOCyrillicEncoding [ % iso-8859-5
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/afii10023/afii10051/afii10052/afii10053/afii10054/afii10055/afii10056
+/afii10057/afii10058/afii10059/afii10060/afii10061/hyphen/afii10062/afii10145
+/afii10017/afii10018/afii10019/afii10020/afii10021/afii10022/afii10024/afii10025
+/afii10026/afii10027/afii10028/afii10029/afii10030/afii10031/afii10032/afii10033
+% 0xc0
+/afii10034/afii10035/afii10036/afii10037/afii10038/afii10039/afii10040/afii10041
+/afii10042/afii10043/afii10044/afii10045/afii10046/afii10047/afii10048/afii10049
+/afii10065/afii10066/afii10067/afii10068/afii10069/afii10070/afii10072/afii10073
+/afii10074/afii10075/afii10076/afii10077/afii10078/afii10079/afii10080/afii10081
+% 0xe0
+/afii10082/afii10083/afii10084/afii10085/afii10086/afii10087/afii10088/afii10089
+/afii10090/afii10091/afii10092/afii10093/afii10094/afii10095/afii10096/afii10097
+/afii61352/afii10071/afii10099/afii10100/afii10101/afii10102/afii10103/afii10104
+/afii10105/afii10106/afii10107/afii10108/afii10109/section/afii10110/afii10193
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOGreekEncoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOGreekEncoding)
+%%EndComments
+/ISOGreekEncoding [ % iso-8859-7
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/quoteleft/quoteright/sterling/.notdef/.notdef/brokenbar/section
+/dieresis/copyright/.notdef/guillemotleft/logicalnot/hyphen/.notdef/afii00208
+/degree/plusminus/twosuperior/threesuperior/tonos/dieresistonos/Alphatonos/periodcentered
+/Epsilontonos/Etatonos/Iotatonos/guillemotright/Omicrontonos/onehalf/Upsilontonos/Omegatonos
+% 0xc0
+/iotadieresistonos/Alpha/Beta/Gamma/Delta/Epsilon/Zeta/Eta
+/Theta/Iota/Kappa/Lambda/Mu/Nu/Xi/Omicron
+/Pi/Rho/.notdef/Sigma/Tau/Upsilon/Phi/Chi
+/Psi/Omega/Iotadieresis/Upsilondieresis/alphatonos/epsilontonos/etatonos/iotatonos
+% 0xe0
+/upsilondieresistonos/alpha/beta/gamma/delta/epsilon/zeta/eta
+/theta/iota/kappa/lambda/mu/nu/xi/omicron
+/pi/rho/sigma1/sigma/tau/upsilon/phi/chi
+/psi/omega/iotadieresis/upsilondieresis/omicrontonos/upsilontonos/omegatonos/.notdef
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOLatin5Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin5Encoding)
+%%EndComments
+/ISOLatin5Encoding [ % iso-8859-9
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/exclamdown/cent/sterling/currency/yen/brokenbar/section
+/dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
+/degree/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
+/cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
+% 0xc0
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Gbreve/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Idotaccent/Scedilla/germandbls
+% 0xe0
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/gbreve/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/dotlessi/scedilla/ydieresis
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOLatin6Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin6Encoding)
+%%EndComments
+/ISOLatin6Encoding [ % iso-8859-10
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/Aogonek/Emacron/Gcommaaccent/Imacron/Itilde/Kcommaaccent/section
+/Lcommaaccent/Dcroat/Scaron/Tbar/Zcaron/hyphen/Umacron/Eng
+/degree/aogonek/emacron/gcommaaccent/imacron/itilde/kcommaaccent/periodcentered
+/lcommaaccent/dcroat/scaron/tbar/zcaron/afii00208/umacron/eng
+% 0xc0
+/Amacron/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Iogonek
+/Ccaron/Eacute/Eogonek/Edieresis/Edotaccent/Iacute/Icircumflex/Idieresis
+/Eth/Ncommaaccent/Omacron/Oacute/Ocircumflex/Otilde/Odieresis/Utilde
+/Oslash/Uogonek/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+% 0xe0
+/amacron/aacute/acircumflex/atilde/adieresis/aring/ae/iogonek
+/ccaron/eacute/eogonek/edieresis/edotaccent/iacute/icircumflex/idieresis
+/eth/ncommaaccent/omacron/oacute/ocircumflex/otilde/odieresis/utilde
+/oslash/uogonek/uacute/ucircumflex/udieresis/yacute/thorn/kgreenlandic
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOLatin7Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin7Encoding)
+%%EndComments
+/ISOLatin7Encoding [ % iso-8859-13
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/quotedblright/cent/sterling/currency/quotedblbase/brokenbar/section
+/Oslash/copyright/Rcommaaccent/guillemotleft/logicalnot/hyphen/registered/AE
+/degree/plusminus/twosuperior/threesuperior/quotedblleft/mu/paragraph/periodcentered
+/oslash/onesuperior/rcommaaccent/guillemotright/onequarter/onehalf/threequarters/ae
+% 0xc0
+/Aogonek/Iogonek/Amacron/Cacute/Adieresis/Aring/Eogonek/Emacron
+/Ccaron/Eacute/Zacute/Edotaccent/Gcommaaccent/Kcommaaccent/Imacron/Lcommaaccent
+/Scaron/Nacute/Ncommaaccent/Oacute/Omacron/Otilde/Odieresis/multiply
+/Uogonek/Lslash/Sacute/Umacron/Udieresis/Zdotaccent/Zcaron/germandbls
+% 0xe0
+/aogonek/iogonek/amacron/cacute/adieresis/aring/eogonek/emacron
+/ccaron/eacute/zacute/edotaccent/gcommaaccent/kcommaaccent/imacron/lcommaaccent
+/scaron/nacute/ncommaaccent/oacute/omacron/otilde/odieresis/divide
+/uogonek/lslash/sacute/umacron/udieresis/zdotaccent/zcaron/quoteright
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/ISOLatin9Encoding /Encoding resourcestatus { pop pop } {
+%!PS-Adobe-3.0 Resource-Encoding
+%%BeginResource: Encoding (ISOLatin9Encoding)
+%%EndComments
+/ISOLatin9Encoding [ % iso-8859-15
+% 0x00
+/.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
+% 0x20
+/space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
+/parenleft/parenright/asterisk/plus/comma/minus/period/slash
+/zero/one/two/three/four/five/six/seven
+/eight/nine/colon/semicolon/less/equal/greater/question
+% 0x40
+/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
+% 0x60
+/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
+% 0x80
+/.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
+% 0xa0
+/space/exclamdown/cent/sterling/Euro/yen/Scaron/section
+/scaron/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
+/degree/plusminus/twosuperior/threesuperior/Zcaron/mu/paragraph/periodcentered
+/zcaron/onesuperior/ordmasculine/guillemotright/OE/oe/Ydieresis/questiondown
+% 0xc0
+/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
+/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
+/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
+/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+% 0xe0
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
+/oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
+] /Encoding defineresource pop
+%%EndResource
+} ifelse
+
+/reencode-font { % fontname font encoding reencode-font font
+  exch dup type dup /nametype eq exch /stringtype eq or { findfont } if
+  dup length dict begin
+    {
+      1 index /FID ne 2 index /UniqueID ne and { def } { pop pop } ifelse
+    } forall
+    /Encoding exch dup type /nametype eq { /Encoding findresource } if def
+    dup /FontName exch def
+    currentdict
+  end
+  definefont
+} bind def
+
+/vertical-font { % fontname font vertical-font font
+  dup type dup /nametype eq exch /stringtype eq or { *findfont } if
+  dup length 1 add dict begin {
+    1 index /FontName eq { pop 1 index def } {
+      1 index /FID ne 2 index /UniqueID ne and { def } { pop pop } ifelse
+    } ifelse
+  } forall /WMode 1 def currentdict end
+  definefont
+} bind def
+
+%
+% fontname [font ...] compose-fontset font
+%
+% References:
+% [1] kanno at jn1jdz.ymt.prug.or.jp, ``jisfont.ps,''
+% in Japanesized Tgif(Tgif-3.0J-p17 JIS patch version), 7 1997.
+%
+/compose-fontset {
+  12 dict begin
+    /FontType 0 def
+    /FontMatrix matrix def
+    /FontBBox { 0 0 0 0 } def
+    /FMapType 3 def
+    %/EscChar 255 def
+    /FDepVector [
+      2 index {
+        dup type dup /nametype eq exch /stringtype eq or { *findfont } if
+        dup /WMode known {
+          dup /WMode get /WMode exch def
+          WMode 1 eq {
+            [ 0 1 -1 0 0 .3 ] makefont
+          } if
+        } if
+      } forall
+    ] def
+    /Encoding [ 0 1 4 index length 1 sub {} for ] def
+    pop
+    dup /FontName exch def
+    currentdict
+  end
+  definefont
+} bind def
+
+/decode-mule-big5 { % R1 R2 1|2 decode-mule-big5 R1 R2
+  2 dict begin
+    3 1 roll
+    /r2 exch def
+    /r1 exch def
+    /r2 r1 16#21 sub 94 mul r2 add 16#21 sub def
+    2 eq { /r2 r2 6280 add def } if
+    /r1 r2 157 idiv 16#a1 add def
+    /r2 r2 157 mod def
+    /r2 r2 r2 16#3f lt { 16#40 } { 16#62 } ifelse add def
+    r1 r2
+  end
+} bind def
+/decode-mule-big5-l1 { % str idx decode-mule-big5-l1 str idx
+  2 copy get exch 1 add exch 2 index 2 index get
+  1 decode-mule-big5
+  buffer size 4 -1 roll put /size size 1 add store
+  buffer size 3 -1 roll put /size size 1 add store 
+} bind def
+/decode-mule-big5-l2 { % str idx decode-mule-big5-l2 str idx
+  2 copy get exch 1 add exch 2 index 2 index get
+  2 decode-mule-big5
+  buffer size 4 -1 roll put /size size 1 add store
+  buffer size 3 -1 roll put /size size 1 add store 
+} bind def
+/decode-gl { % str idx decode-gl str idx
+  2 copy get buffer size 3 -1 roll put
+  /size size 1 add store
+} bind def
+/decode-gr { % str idx decode-gr str idx
+  2 copy get 16#80 add buffer size 3 -1 roll put
+  /size size 1 add store
+} bind def
+/iso-2022-set [
+  [ (\033\(B)	{decode-gl}		] % iso-2022:ascii
+  [ (\033,A)	{decode-gr}		] % iso-2022:iso-8859-1,iso-latin1
+  [ (\033,B)	{decode-gr}		] % iso-2022:iso-8859-2,iso-latin2
+% [ (\033,C)	{decode-gr}		] % iso-2022:iso-8859-3,iso-latin3
+% [ (\033,D)	{decode-gr}		] % iso-2022:iso-8859-4,iso-latin4
+% [ (\033,F)	{decode-gr}		] % iso-2022:iso-8859-7,iso-greek
+% [ (\033,G)	{decode-gr}		] % iso-2022:iso-8859-6,iso-arabic
+% [ (\033,H)	{decode-gr}		] % iso-2022:iso-8859-8,iso-hebrew
+% [ (\033,L)	{decode-gr}		] % iso-2022:iso-8859-5,iso-cyrillic
+  [ (\033,M)	{decode-gr}		] % iso-2022:iso-8859-9,iso-latin5
+% [ (\033,T)	{decode-gr}		] % iso-2022:iso-8859-11,iso-thai
+% [ (\033,V)	{decode-gr}		] % iso-2022:iso-8859-10,iso-latin6
+  [ (\033\(I)	{decode-gl}		] % iso-2022:jis-x-0201-kana
+  [ (\033\(J)	{decode-gl}		] % iso-2022:jis-x-0201-roman
+% [ (\033\(T)	{decode-gl}		] % iso-2022:gb-1988-roman
+  [ (\033$@)	{decode-gl}		] % iso-2022:jis-x-0208-1978
+  [ [ (\033$A) (\033$\(A) ]			{decode-gl}	] % iso-2022:gb-2312-1980
+  [ [ (\033$B) (\033$\(B) (\033&@\033$B) ]	{decode-gl}	] % iso-2022:jis-x-0208-1983&1990
+  [ (\033$\(C)	{decode-gl}		] % iso-2022:ks-x-1001-1992
+  [ (\033$\(D)	{decode-gl}		] % iso-2022:jis-x-0212-1990
+  [ (\033$\(?)	{decode-gl}		] % iso-2022:gbt-12345-1990,private-iso-gbt
+  [ (\033$\(G)	{decode-gl}		] % iso-2022:cns-11643-1992-p1
+  [ (\033$\(H)	{decode-gl}		] % iso-2022:cns-11643-1992-p2
+  [ (\033$\(0)	{decode-mule-big5-l1}	] % iso-2022:big5,mule-big5
+  [ (\033$\(1)	{decode-mule-big5-l2}	] % iso-2022:big5,mule-big5
+] def
+/iso-2022-translate { % str idx iso-2022-translate str idx
+  2 copy get 16#20 lt {
+    iso-2022-set length 1 sub 0 1 3 -1 roll {	% str idx j
+      iso-2022-set 1 index get 0 get dup	% str idx j ()|[] ()|[]
+      dup type /stringtype eq {			% str idx j () ()
+        dup length 5 index 5 index 3 -1 roll 7 index length 7 index sub
+        2 copy lt { pop } { exch pop } ifelse
+        getinterval eq				% str idx j () true|false
+      } {					% str idx j [] []
+        pop () false 3 -1 roll {
+          dup 4 -1 roll pop 3 1 roll
+          dup length 6 index 6 index 3 -1 roll 8 index length 8 index sub
+          2 copy lt { pop } { exch pop } ifelse
+          getinterval eq or dup { exit } if	% str idx j () true|false
+        } forall
+      } ifelse
+      { exch /iso-2022-state exch store length 1 sub add exit } { pop } ifelse
+      pop
+    } for
+  } if
+} bind def
+/iso-2022-show { % str iso-2022-show -
+  10 dict begin
+    /iso-6429-state null def
+    /iso-2022-state 0 def
+    /iso-2022-current iso-2022-state def
+    /buffer 65535 string def
+    /size 0 def
+    /width 0 def
+    /BoldFont false def /Underscore false def /BackColor 1 def
+    /foldline dup where { pop foldline } { false } ifelse def
+    0 { % idx {} loop
+      dup 2 index length lt {
+        iso-2022-translate
+        iso-2022-state iso-2022-current ne {
+          buffer size 8#377 put
+          /size size 1 add store
+          buffer size iso-2022-state put
+          /size size 1 add store
+        } {
+          iso-6429-translate
+          iso-6429-state null ne {
+            iso-6429-set iso-6429-state get 1 get exec
+          } {
+            iso-2022-set iso-2022-current get 1 get exec
+          } ifelse
+        } ifelse
+      } {
+        exit
+      } ifelse
+      /iso-2022-current iso-2022-state store
+      1 add
+    } loop
+    pop pop
+    iflush
+  end
+} bind def
+/ichop {	% required for some Adobe-official PostScript interpreters
+  dup length dup 2 sub -2 0 {		% str len len-2 -2 0 {} for
+    2 index 1 index get 8#377 eq	% str len idx c(str idx get) 8#377 eq
+    { exch pop } { pop exit } ifelse	% str len|idx
+  } for 0 exch getinterval		% str'(str 0 len|idx getinterval)
+} bind def
+
+/iso-6429-set [
+  [ (\t)
+    { buffer 0 size getinterval ichop	% ``ichop'' is not required for GS
+      stringwidth pop ( ) stringwidth pop div round cvi width add
+      8 dup 3 1 roll mod sub {
+      buffer size ( ) putinterval /size size 1 add store
+    } repeat } bind
+  ]
+  [ (\f)	{ iflush margin 0 get margin 3 get moveto } bind ]
+  [ [ (\033[m) (\033[0m) ]
+    { iflush
+      /BoldFont false	textfont
+      /Underscore false	textfont
+      0			textcolor
+      1			backcolor
+    } bind
+  ] % All Off
+  [ (\033[1m)	{ iflush /BoldFont true		textfont } bind ]
+  [ (\033[4m)	{ iflush /Underscore true	textfont } bind ]
+  [ (\033[22m)	{ iflush /BoldFont false	textfont } bind ]
+  [ (\033[24m)	{ iflush /Underscore false	textfont } bind ]
+  [ (\033[30m)	{ iflush 0		textcolor } bind ]
+  [ (\033[31m)	{ iflush [ 1 0 0 ]	textcolor } bind ]
+  [ (\033[32m)	{ iflush [ 0 1 0 ]	textcolor } bind ]
+  [ (\033[33m)	{ iflush [ 1 1 0 ]	textcolor } bind ]
+  [ (\033[34m)	{ iflush [ 0 0 1 ]	textcolor } bind ]
+  [ (\033[35m)	{ iflush [ 1 0 1 ]	textcolor } bind ]
+  [ (\033[36m)	{ iflush [ 0 1 1 ]	textcolor } bind ]
+  [ (\033[37m)	{ iflush 1		textcolor } bind ]
+  [ (\033[39m)	{ iflush 0		textcolor } bind ]
+  [ (\033[40m)	{ iflush 0		backcolor } bind ]
+  [ (\033[41m)	{ iflush [ 1 0 0 ]	backcolor } bind ]
+  [ (\033[42m)	{ iflush [ 0 1 0 ]	backcolor } bind ]
+  [ (\033[43m)	{ iflush [ 1 1 0 ]	backcolor } bind ]
+  [ (\033[44m)	{ iflush [ 0 0 1 ]	backcolor } bind ]
+  [ (\033[45m)	{ iflush [ 1 0 1 ]	backcolor } bind ]
+  [ (\033[46m)	{ iflush [ 0 1 1 ]	backcolor } bind ]
+  [ (\033[47m)	{ iflush 1		backcolor } bind ]
+  [ (\033[49m)	{ iflush 1		backcolor } bind ]
+] def
+/iso-6429-translate { % str idx iso-6429-translate str idx
+  /iso-6429-state null store
+  2 copy get 16#20 lt {
+    iso-6429-set length 1 sub 0 1 3 -1 roll {	% str idx j
+      iso-6429-set 1 index get 0 get dup	% str idx j ()|[] ()|[]
+      dup type /stringtype eq {			% str idx j () ()
+        dup length 5 index 5 index 3 -1 roll 7 index length 7 index sub
+        2 copy lt { pop } { exch pop } ifelse
+        getinterval eq				% str idx j () true|false
+      } {					% str idx j [] []
+        pop () false 3 -1 roll {
+          dup 4 -1 roll pop 3 1 roll
+          dup length 6 index 6 index 3 -1 roll 8 index length 8 index sub
+          2 copy lt { pop } { exch pop } ifelse
+          getinterval eq or dup { exit } if	% str idx j () true|false
+        } forall
+      } ifelse
+      { exch /iso-6429-state exch store length 1 sub add exit } { pop } ifelse
+      pop
+    } for
+  } if
+} bind def
+/show-attribute {
+  BackColor dup type dup /integertype eq exch /realtype eq or {
+    dup 1 eq { pop } {
+      gsave setgray BoldFont { setboldfont } if textfill grestore
+    } ifelse
+  } {
+    gsave cvx exec setrgbcolor BoldFont { setboldfont } if textfill grestore
+  } ifelse
+  Underscore {
+    gsave .2 setlinewidth currentpoint fontsize .1 mul sub moveto
+    BoldFont { setboldfont } if dup stringwidth pop 0 rlineto stroke grestore
+  } if
+  BoldFont {
+    gsave setboldfont show currentpoint grestore moveto
+  } {
+    show
+  } ifelse
+} bind def
+/cshow-attribute {
+  pop currentpoint pop add pagesize 0 get margin 2 get sub lt {
+    1 string dup 0 4 -1 roll put show-attribute
+  } {
+    currentpoint exch pop fontsize sub round margin 3 get lt {
+      gsave
+      nextpage preparepage
+      currentpoint matrix currentmatrix grestore setmatrix moveto
+    } {
+      origin 0 get currentpoint exch pop fontsize sub moveto
+    } ifelse
+    1 string dup 0 4 -1 roll put show-attribute
+  } ifelse
+} bind def
+/iflush {
+  size 0 gt {
+    buffer 0 size getinterval ichop	% ``ichop'' is not required for GS
+    dup stringwidth pop ( ) stringwidth pop div round cvi /width exch store
+    foldline not {
+      show-attribute
+    } {
+      dup stringwidth
+      pop currentpoint pop add pagesize 0 get margin 2 get sub lt {
+        show-attribute
+      } {
+        BoldFont { /BoldFont false store
+          gsave setboldfont
+	  { cshow-attribute } exch cshow
+	  currentpoint grestore moveto
+        } {
+          { cshow-attribute } exch cshow
+        } ifelse
+      } ifelse      
+    } ifelse
+    /size 0 store
+  } if
+} bind def
+/textfont { % /BoldFont|/Underscore any textfont -
+  store
+} bind def
+/textcolor {
+  dup type dup /integertype eq exch /realtype eq or { setgray }
+  { cvx exec setrgbcolor } ifelse
+} bind def
+/backcolor {
+  /BackColor exch store
+} bind def
+/textfill {
+  currentpoint fontsize .2 mul sub 2 index stringwidth pop fontsize
+  4 -2 roll moveto dup 0 exch rlineto exch 0 rlineto neg 0 exch rlineto
+  closepath fill
+} bind def
+/setboldfont {
+  currentfont /FontName get dup length string cvs (-Bold)
+  exch dup length 2 index length add string
+  dup dup 4 2 roll copy length 4 -1 roll putinterval cvn
+  findfont [fontwidth 0 0 fontsize 0 0] makefont setfont
+} bind def
+/iso-6429-show { % str iso-6429-show -
+  8 dict begin
+    /iso-6429-state null def
+    /buffer 65535 string def
+    /size 0 def
+    /width 0 def
+    /BoldFont false def /Underscore false def /BackColor 1 def
+    /foldline dup where { pop foldline } { false } ifelse def
+    0 { % idx {} loop
+      dup 2 index length lt {
+        iso-6429-translate
+        iso-6429-state null ne {
+          iso-6429-set iso-6429-state get 1 get exec
+        } {
+          2 copy get buffer size 3 -1 roll put
+          /size size 1 add store
+        } ifelse
+      } {
+        exit
+      } ifelse
+      1 add
+    } loop
+    pop pop
+    iflush
+  end
+} bind def
+/shown-init {
+  /inshow exch def
+  /mediasize [ 595 842 ] def
+  /mediamargin [ 30 30 30 30 ] def
+  /pagesize [
+    mediasize cvx exec mediamargin cvx exec
+    3 -1 roll add 3 1 roll add 3 1 roll sub 3 1 roll sub exch
+  ] def
+  /margin [ 20 28 20 28 ] def
+  /division [ 1 1 ] def
+  /landscape false def
+  /landscale false def
+  /evenscale true def
+  /pagescale false def
+  pagescale not {
+    /pagesize [
+      pagesize 0 get division 0 get div pagesize 1 get division 1 get div
+    ] store
+  } if
+  landscape {
+    /pagesize [ pagesize cvx exec exch ] store
+    /margin [ margin cvx exec 4 1 roll ] store
+  } if
+  /verttext dup where { pop verttext } { false } ifelse def
+  /foldline true def
+  /header true def /footer true def /border true def
+  /origin [ margin 0 get pagesize 1 get margin 1 get sub fontsize sub ] def
+  /position [ 0 0 ] def
+  /preparepage { initmatrix
+    landscape landscale xor not {
+      mediasize cvx exec exch mediamargin 0 get mediamargin 2 get add sub
+      division 0 get div position 0 get mul mediamargin 0 get add
+      exch dup mediamargin 1 get mediamargin 3 get add sub
+      division 1 get div position 1 get 1 add mul sub mediamargin 1 get sub
+      translate
+      pagescale { landscale not { 1 } { pagesize cvx exec div } ifelse
+        division 1 get div evenscale { dup } {
+          landscale not { 1 } { pagesize cvx exec exch div } ifelse
+          division 0 get div exch
+        } ifelse scale
+      } if
+    } {
+      verttext {
+        180 rotate mediasize { neg } forall translate
+      } if
+      mediasize cvx exec exch mediamargin 0 get mediamargin 2 get add sub
+      division 0 get div position 0 get mul mediamargin 0 get add
+      exch mediamargin 1 get mediamargin 3 get add sub
+      division 1 get div position 1 get mul mediamargin 3 get add
+      translate
+      pagescale { landscale not { 1 } { pagesize cvx exec div } ifelse
+        division 0 get div evenscale { dup } {
+          landscale not { 1 } { pagesize cvx exec exch div } ifelse
+          division 1 get div
+        } ifelse scale
+      } if
+      90 rotate 0 pagesize 1 get neg translate
+    } ifelse
+    origin cvx exec moveto
+  } bind def
+  /gssafe false def	% GS-safe but not always perfect at decoratepage
+  /nextpage { gssafe { /decorated false store } { decoratepage } ifelse
+    position landscape landscale or not { 0 } { 1 } ifelse 2 copy get 1 add
+    dup 4 1 roll put
+    division landscape landscale or not { 0 } { 1 } ifelse get eq {
+      position landscape landscale or not { 0 } { 1 } ifelse 0 put
+      position landscape landscale or not { 1 } { 0 } ifelse 2 copy get 1 add
+      dup 4 1 roll put
+      division landscape landscale or not { 1 } { 0 } ifelse get eq {
+        position landscape landscale or not { 1 } { 0 } ifelse 0 put
+        showpage
+      } if
+    } if
+  } bind def
+  /lastpage { gssafe {} { decoratepage } ifelse showpage } bind def
+  /nextline {
+    currentpoint exch pop fontsize sub round margin 3 get lt {
+      nextpage preparepage /empty true store
+    } {
+      origin 0 get currentpoint exch pop fontsize sub moveto
+    } ifelse
+  } bind def
+  %
+  /page 0 def
+  /infofont /Helvetica findfont [fontwidth 0 0 fontsize 0 0] makefont def
+  /head (gs-cjk project: iso-2022-7bit - Emacs/Mule editable PostScript file) def
+  /showheader {
+    header {
+      gsave
+      verttext not {
+        margin 0 get pagesize 1 get margin 1 get sub fontsize add moveto
+      } {
+        margin 0 get fontsize sub margin 3 get translate 90 rotate
+        fontsize fontwidth div fontwidth fontsize div scale 0 0 moveto
+      } ifelse
+      1 dict dup /foldline false put begin
+        infofont setfont head inshow
+      end
+      grestore
+    } if
+  } bind def
+  /foot 64 string def
+  /showfooter {
+    /page page 1 add store
+    footer {
+      gsave
+      verttext not {
+        pagesize 0 get margin 2 get sub margin 3 get fontsize 2 mul sub moveto
+      } {
+        pagesize 0 get margin 2 get sub fontsize 2 mul add
+        pagesize 1 get margin 1 get sub translate 90 rotate
+        fontsize fontwidth div fontwidth fontsize div scale 0 0 moveto
+      } ifelse
+      1 dict dup /foldline false put begin
+        infofont setfont page foot cvs dup stringwidth pop neg 0 rmoveto inshow
+      end
+      grestore
+    } if
+  } bind def
+  /bord {
+    pagesize cvx exec margin { fontsize 2 div sub } forall
+    3 1 roll exch 5 -1 roll exch sub exch 5 -1 roll exch sub exch
+    4 copy 3 1 roll exch 8 -2 roll moveto lineto 4 2 roll lineto lineto
+    closepath
+  } bind def
+  /showborder {
+    border {
+      gsave .25 setlinewidth bord stroke grestore
+    } if
+  } bind def
+  /decoratepage { showheader showfooter showborder } bind def
+  %
+  preparepage /empty true def
+  gssafe { /decorated false def } if
+} bind def
+/shown {
+  gssafe { decorated not { decoratepage /decorated true store } if } if
+  inshow /empty false store nextline
+} bind def
+/shown-close { empty not { lastpage } if } bind def
+/shown-readlines {
+  /shown-buffer 65535 string def
+  shown-init
+  {
+    currentfile shown-buffer readline not { pop exit } if
+    shown
+  } loop
+  shown-close
+} bind def
+/shown-readhexstrings {
+  /shown-buffer 65535 string def
+  /shown-size 0 def
+  /previous-char (\000) def
+  shown-init
+  {
+    currentfile 1 string readhexstring not { pop exit } if
+    dup (\n) ne {
+      dup (\r) ne {
+        shown-buffer shown-size 2 index putinterval
+        /shown-size shown-size 1 add store
+      } { % mac
+        shown-buffer 0 shown-size getinterval shown
+        /shown-size 0 store
+      } ifelse
+    } { % unix
+      previous-char (\r) ne {
+        shown-buffer 0 shown-size getinterval shown
+      } { % dos
+      } ifelse
+      /shown-size 0 store
+    } ifelse
+    previous-char 0 3 -1 roll putinterval
+  } loop
+  shown-close
+} bind def
+
+/fitfont { [ .8335276 0 0 .8335276 0 .1 ] makefont } bind def
+
+/verttext false unknowndef
+/iso-2022-fontset [
+  /Courier			findfont fitfont	% iso-2022:ascii
+  /Courier-Latin1		/Courier /ISOLatin1Encoding	reencode-font fitfont	% iso-2022:iso-8859-1,iso-latin1
+  /Courier-Latin2		/Courier /ISOLatin2Encoding	reencode-font fitfont	% iso-2022:iso-8859-2,iso-latin2
+% /CourierNewLatin3		findfont fitfont	% iso-2022:iso-8859-3,iso-latin3
+% /CourierNewLatin4		findfont fitfont	% iso-2022:iso-8859-4,iso-latin4
+% /CourierNewGreek		findfont fitfont	% iso-2022:iso-8859-7,iso-greek
+% /CourierNewArabic		findfont fitfont	% iso-2022:iso-8859-6,iso-arabic
+% /CourierNewHebrew		findfont fitfont	% iso-2022:iso-8859-8,iso-hebrew
+% /Courier-Cyrillic		/CourierNewCyrillic /ISOCyrillicEncoding	reencode-font fitfont	% iso-2022:iso-8859-5,iso-cyrillic
+  /Courier-Latin5		/Courier /ISOLatin5Encoding	reencode-font fitfont	% iso-2022:iso-8859-9,iso-latin5
+% /CourierNewThai		findfont fitfont	% iso-2022:iso-8859-11,iso-thai
+% /CourierNewLatin6		findfont fitfont	% iso-2022:iso-8859-10,iso-latin6
+  verttext not {
+  /Ryumin-Light.Katakana	% iso-2022:jis-x-0201-kana
+  /Ryumin-Light.Roman		% iso-2022:jis-x-0201-roman
+% /STSong-Light-GBK-EUC-H	% iso-2022:gb-1988-roman
+  /Ryumin-Light-78-H		% iso-2022:jis-x-0208-1978
+  /STSong-Light-GB-H		% iso-2022:gb-2312-1980
+  /Ryumin-Light-H		% iso-2022:jis-x-0208-1983&1990
+  /HYSMyeongJo-Medium-KSC-H	% iso-2022:ks-x-1001-1992
+  /HeiseiMin-W3H-Hojo-H		% iso-2022:jis-x-0212-1990
+  /STSong-Light-GBT-H		% iso-2022:gbt-12345-1990,private-iso-gbt
+  /MSung-Light-CNS1-H		% iso-2022:cns-11643-1992-p1
+  /MSung-Light-CNS2-H		% iso-2022:cns-11643-1992-p2
+  /MSung-Light-ETen-B5-H	% iso-2022:big5,mule-big5
+  /MSung-Light-ETen-B5-H	% iso-2022:big5,mule-big5
+  } {
+  /Ryumin-Light.Katakana-V	/Ryumin-Light.Katakana	vertical-font	% iso-2022:jis-x-0201-kana
+  /Ryumin-Light.Roman-V		/Ryumin-Light.Roman	vertical-font	% iso-2022:jis-x-0201-roman
+% /STSong-Light-GBK-EUC-V	% iso-2022:gb-1988-roman
+  /Ryumin-Light-78-V		% iso-2022:jis-x-0208-1978
+  /STSong-Light-GB-V		% iso-2022:gb-2312-1980
+  /Ryumin-Light-V		% iso-2022:jis-x-0208-1983&1990
+  /HYSMyeongJo-Medium-KSC-V	% iso-2022:ks-x-1001-1992
+  /HeiseiMin-W3H-Hojo-V		% iso-2022:jis-x-0212-1990
+  /STSong-Light-GBT-V		% iso-2022:gbt-12345-1990,private-iso-gbt
+  /MSung-Light-CNS1-V		% iso-2022:cns-11643-1992-p1
+  /MSung-Light-CNS2-V		% iso-2022:cns-11643-1992-p2
+  /MSung-Light-ETen-B5-V	% iso-2022:big5,mule-big5
+  /MSung-Light-ETen-B5-V	% iso-2022:big5,mule-big5
+  } ifelse
+] def
+/iso-2022-bold-fontset [
+  /Courier-Bold			findfont fitfont	% iso-2022:ascii
+  /Courier-Bold-Latin1		/Courier-Bold /ISOLatin1Encoding	reencode-font fitfont	% iso-2022:iso-8859-1,iso-latin1
+  /Courier-Bold-Latin2		/Courier-Bold /ISOLatin2Encoding	reencode-font fitfont	% iso-2022:iso-8859-2,iso-latin2
+% /CourierNewLatin3-Bold	findfont fitfont	% iso-2022:iso-8859-3,iso-latin3
+% /CourierNewLatin4-Bold	findfont fitfont	% iso-2022:iso-8859-4,iso-latin4
+% /CourierNewGreek-Bold		findfont fitfont	% iso-2022:iso-8859-7,iso-greek
+% /CourierNewArabic-Bold	findfont fitfont	% iso-2022:iso-8859-6,iso-arabic
+% /CourierNewHebrew-Bold	findfont fitfont	% iso-2022:iso-8859-8,iso-hebrew
+% /Courier-Bold-Cyrillic	/CourierNewCyrillic-Bold /ISOCyrillicEncoding	reencode-font fitfont	% iso-2022:iso-8859-5,iso-cyrillic
+  /Courier-Bold-Latin5		/Courier-Bold /ISOLatin5Encoding	reencode-font fitfont	% iso-2022:iso-8859-9,iso-latin5
+% /CourierNewThai-Bold		findfont fitfont	% iso-2022:iso-8859-11,iso-thai
+% /CourierNewLatin6-Bold	findfont fitfont	% iso-2022:iso-8859-10,iso-latin6
+  verttext not {
+  /GothicBBB-Medium.Katakana	% iso-2022:jis-x-0201-kana
+  /GothicBBB-Medium.Roman	% iso-2022:jis-x-0201-roman
+% /STHeiti-Regular-GBK-EUC-H	% iso-2022:gb-1988-roman
+  /GothicBBB-Medium-78-H	% iso-2022:jis-x-0208-1978
+  /STHeiti-Regular-GB-H		% iso-2022:gb-2312-1980
+  /GothicBBB-Medium-H		% iso-2022:jis-x-0208-1983&1990
+  /HYGoThic-Medium-KSC-H	% iso-2022:ks-x-1001-1992
+  /HeiseiKakuGo-W5H-Hojo-H	% iso-2022:jis-x-0212-1990
+  /STHeiti-Regular-GBT-H	% iso-2022:gbt-12345-1990,private-iso-gbt
+  /MHei-Medium-CNS1-H		% iso-2022:cns-11643-1992-p1
+  /MHei-Medium-CNS2-H		% iso-2022:cns-11643-1992-p2
+  /MHei-Medium-ETen-B5-H	% iso-2022:big5,mule-big5
+  /MHei-Medium-ETen-B5-H	% iso-2022:big5,mule-big5
+  } {
+  /GothicBBB-Medium.Katakana-V	/GothicBBB-Medium.Katakana	vertical-font	% iso-2022:jis-x-0201-kana
+  /GothicBBB-Medium.Roman-V	/GothicBBB-Medium.Roman		vertical-font	% iso-2022:jis-x-0201-roman
+% /STHeiti-Regular-GBK-EUC-V	% iso-2022:gb-1988-roman
+  /GothicBBB-Medium-78-V	% iso-2022:jis-x-0208-1978
+  /STHeiti-Regular-GB-V		% iso-2022:gb-2312-1980
+  /GothicBBB-Medium-V		% iso-2022:jis-x-0208-1983&1990
+  /HYGoThic-Medium-KSC-V	% iso-2022:ks-x-1001-1992
+  /HeiseiKakuGo-W5H-Hojo-V	% iso-2022:jis-x-0212-1990
+  /STHeiti-Regular-GBT-V	% iso-2022:gbt-12345-1990,private-iso-gbt
+  /MHei-Medium-CNS1-V		% iso-2022:cns-11643-1992-p1
+  /MHei-Medium-CNS2-V		% iso-2022:cns-11643-1992-p2
+  /MHei-Medium-ETen-B5-V	% iso-2022:big5,mule-big5
+  /MHei-Medium-ETen-B5-V	% iso-2022:big5,mule-big5
+  } ifelse
+] def
+/fontset-iso-2022 iso-2022-fontset compose-fontset pop
+/fontset-iso-2022-Bold iso-2022-bold-fontset compose-fontset pop
+%%EndProlog
+/fontsize 11 def /fontwidth 11 def
+/fontset-iso-2022 findfont [fontwidth 0 0 fontsize 0 0] makefont setfont
+{ iso-2022-show } shown-readlines
+A list of ways to say hello in various languages.
+
+Czech (,Bh(Besky)		Dobr,B}(B den
+Danish (Dansk)		Hej, Goddag
+English			Hello
+Esperanto		Saluton
+Estonian		Tere, Tervist
+PostScript		(Hello) =
+Finnish (Suomi)		Hei
+French (Fran,Ag(Bais)	Bonjour, Salut
+German (Deutsch Nord)	Guten Tag
+
+Italiano		Ciao, Buon giorno
+
+Maltese			Ciao
+Nederlands, Vlaams	Hallo, Dag
+Norwegian (Norsk)	Hei, God dag
+Polish			Dzie,Bq(B dobry, Hej
+
+Slovak			Dobr,B}(B de,Br(B
+Spanish (Espa,Aq(Bol)	,A!(BHola!
+Swedish (Svenska)	Hej, Goddag
+
+Turkish (T,M|(Brk,Mg(Be)	Merhaba
+
+Chinese  ($(GDcEF$(0!.$(GiGk#$(0!.Vn^V)t(B)		$(0<@)p$(G!$I#Go!$$(0'*)y!$(B
+Chinese  ($AVPND#,::So#,<rLeWV(B)		$ADz:C!#Dc:C!#(B
+Japanese ($BF|K\8l!"4A;z!"J?2>L>!"JR2>L>(B)	$B$3$s$K$A$O!#(I:]FAJ(B.
+Korean   ($(CGQ1[#,ySm.(B)			$(C>H3gGO=J4O1n#.>H3gGO<<?d#.(B
+
+Difference among chinese characters in GB, JIS, KSC, BIG5:
+	GB	-- $AT*Fx(B  $A?*7"(B
+	JIS	-- $B855$(B  $B3+H/(B
+	KSC	-- $(Cj*Q((B  $(CKR[!(B
+	BIG5	-- $(0&x86(B  $(0DeBv(B
+
+Just for a test of JISX0212: $BqV$(DiQ(B (the second character is of JISX0212)
+
+Just for a test of JISX0201: (I123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\&]_^(B
+
+Difference between JISX0208.1978 and 1983:
+
+	\x1b$@	$@032)3B3I3v4C4R6F7[979\<I?YA(D[EWEnEsFvGhI0KjKyLyMZO6(B
+	\x1b$B	$B032)3B3I3v4C4R6F7[979\<I?YA(D[EWEnEsFvGhI0KjKyLyMZO6(B
+
+Difference between GB2312.1980 and GBT12345.1990
+
+	\x1b$A	$AMrLuP4;-8v:s<8;z at oTS@kRuQt4SQyJ&8IO0?*Fx5g9X6T;6<&Gl(B
+		$A1_9};9=xT6Ub;*0.HHME4&RURdRZSJ(B
+		$AJiN*3$J1S&6+35K-8xAeR{CE<dNJM7BrBt(B
+	\x1b$(?	$(?MrLuP4;-8v:s<8;z at oTS@kRuQt4SQyJ&8IO0?*Fx5g9X6T;6<&Gl(B
+		$(?1_9};9=xT6Ub;*0.HHME4&RURdRZSJ(B
+		$(?JiN*3$J1S&6+35K-8xAeR{CE<dNJM7BrBt(B
+
+Color names:
+	BLACK	$(0E**d(B	$A:ZI+(B	$B9u?'(B	$(C0KA$;v(B	
+	RED	$(04y*d(B	$A:lI+(B	$B at V?'(B	$(C;!0-;v(B	
+	GREEN	$(0L;*d(B	$ABLI+(B	$BNP?'(B	$(C3k6{;v(B	
+	YELLOW	$(0E(Yn*d(B	$A;FI+(B	$B2+?'(B	$(CH2;v(B	
+	BLUE	$(0Y1*d(B	$A at 6I+(B	$B at D?'(B	$(CFD6{;v(B	
+	MAGENTA	$(0C<*d(B	$AWOI+(B	$B;g?'(B	$(C:86s;v(B	
+	CYAN	$(0LJL;*d(B	$A4dBLI+(B	$B at DNP?'(B	$(CC;7O;v(B	
+	WHITE	$(0(v*d(B	$A0WI+(B	$BGr?'(B	$(CGO>a;v(B	

Added: trunk/gs/lib/cjkv/baseutil.ps
===================================================================
--- trunk/gs/lib/cjkv/baseutil.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/lib/cjkv/baseutil.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,569 @@
+%!
+%
+% Developed by AXE,Inc., BBR Inc. and Turbolinux Inc.
+%   under the technical advice by suzuki toshiya (Hiroshima University)
+% For questions, please send mail to espgs8-cjk at printing-japan.org
+%
+% (C) Copyright 2006 Center of the International Cooperation for
+%     Computerization
+%
+%
+% Based on gs-cjk patches
+% Copyright (C) 2001-2003 gs-cjk project:
+%   Taiji Yamada, Masatake Yamato, Hideyuki Suzuki and suzuki toshiya.
+%   Enhancements by Akira Tagoh and Taiji Yamada, 2005.
+%   All rights reserved.
+%
+%
+% Based on GNU Ghostscript 7.07 and 8.15
+% Copyright (C) 1996-2003 artofcode LLC.  All rights reserved.
+%
+% This software is provided AS-IS with no warranty, either express or
+% implied.
+%
+%
+% This program is free software;  you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation; either version 2 of
+% the License, or (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+% See the GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; if not, write to the Free Software Foundation,
+% Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%
+
+[
+   /CJKV_DEBUG_BASE
+] {dup where {pop pop} { currentdict exch false def pop } ifelse} forall
+
+/_cjkv_ttcmap_tmp 10 dict def
+
+/_cjkv_base_util 50 dict dup begin
+
+  /.cjkv_newdicttomark { % <mark> <k1> <v1> ... <kn> <vn> <extra_space> .cjkv_newdicttomark <dict>
+    CJKV_DEBUG_BASE { (--- .cjkv_newdicttomark start\n) print flush  } if
+    counttomark 1 sub 2 idiv add dict   % <mark> <k1> <v1> ... <kn> <vn> <dict>
+    CJKV_DEBUG_BASE { (--- scratch dict making finished\n) print flush  } if
+    counttomark 1 sub 2 idiv {
+      dup                               % <mark> <k1> <v1> ... <kn> <vn> <dict> <dict>
+      4 2 roll                          % <mark> <k1> <v1> ... <dict> <dict> <kn> <vn>
+      dup type /stringtype eq { dup length string copy } if
+      dup type /arraytype  eq {
+        dup length array exch dup length 0 exch 1 exch 1 sub {
+          1 index 1 index get dup type /stringtype eq {
+            dup length string copy
+          } if
+          [ exch ]
+          3 index 3 1 roll putinterval
+        } for
+        pop
+      } if
+      dup type /dicttype   eq {
+        dup length dict exch
+        [ 1 index { pop } forall ] {
+          1 index 1 index get dup type /stringtype eq {
+            dup length string copy
+          } if
+          3 index 3 1 roll put
+        } forall
+        pop
+      } if
+      put                               % <mark> <k1> <v1> ... <dict>
+      CJKV_DEBUG_BASE { (--- copy ok\n) print flush  } if
+    } repeat                            % <mark> <dict>
+    exch pop                            % <dict>
+    CJKV_DEBUG_BASE { (--- .cjkv_newdicttomark ok\n) print flush  } if
+  } bind def
+
+  /orgXUID AladdinEnterprisesXUID def
+  /maxstring 32000 def    % half the maximum length of a PostScript string,
+                          % must be a multiple of 4 (for hmtx / loca / vmtx)
+  
+
+  /.cjkv_xuidstring <80000000> def
+
+  /.cjkv_curxuid {              % - curxuid <int>
+    0 .cjkv_xuidstring { exch 8 bitshift exch add } forall
+  } bind def
+
+  /.cjkv_nextxuid {             % - nextxuid -
+    3 -1 0 {
+      .cjkv_xuidstring 1 index 2 copy get dup 255 ne {
+        1 add put pop exit
+      } if pop 0 put pop
+    } for
+  } bind def
+  
+  % <string> <index> .cjkv_getu16 <integer>
+  /.cjkv_getu16 {
+    2 copy get 8 bitshift 3 1 roll 1 add get add
+  } bind def
+  
+  % <string> <index> .cjkv_gets16 <integer>
+  /.cjkv_gets16 {
+    .cjkv_getu16 16#8000 xor 16#8000 sub
+  } bind def
+  
+  % <string> <index> .cjkv_getu32 <integer>
+  /.cjkv_getu32 {
+    2 copy .cjkv_getu16 16 bitshift 3 1 roll 2 add .cjkv_getu16 add
+  } bind def
+  
+  % <string> <index> .cjkv_gets32 <integer>
+  /.cjkv_gets32 {
+    2 copy .cjkv_gets16 16 bitshift 3 1 roll 2 add .cjkv_getu16 add
+  } bind def
+  
+  % <string> <index> <integer> .cjkv_putu16 -
+  /.cjkv_putu16 {
+    3 copy -8 bitshift put
+    exch 1 add exch 16#ff and put
+  } bind def
+  
+  % <string> <index> <integer> .cjkv_putu32 -
+  /.cjkv_putu32 {
+    3 copy -16 bitshift .cjkv_putu16
+    exch 2 add exch 16#ffff and .cjkv_putu16
+  } bind def
+
+  /.cjkv_biglength { % <str>|<array of str> .biglength <integer>
+    dup type /arraytype eq { 0 exch { length add } forall } { length } ifelse
+  } bind def
+  
+  /.cjkv_concats { % [str ...] concats str
+    () exch dup length 1 sub -1 0 {
+      1 index exch get dup type /stringtype ne { dup length string cvs } if
+      3 -1 roll exch dup length 2 index length add string
+      dup dup 4 2 roll copy length 4 -1 roll putinterval exch
+    } for pop
+  } bind def
+  
+  % <str>|<array of str> <index> <count> .cjkv_biggetinterval <str>|<array of str>
+  /.cjkv_biggetinterval {
+    currentglobal 4 1 roll
+    false setglobal
+    5 dict begin
+    2 index type /arraytype eq {
+      /c exch def
+      /i exch def
+      [ exch {
+        dup length /l exch def
+        i c add l gt {
+          i l lt {
+            i l i sub getinterval
+            /c i c add l sub def
+            /i 0 def
+          } {
+            pop
+            /i i l sub def
+          } ifelse
+        } {
+          i c getinterval exit
+        } ifelse
+      } forall
+      counttomark array dup length 1 sub -1 0 { 1 index exch 3 index put exch pop } for exch pop
+      dup .cjkv_biglength 65535 le { .cjkv_concats } if
+    } { getinterval } ifelse
+    end
+    exch setglobal
+  } bind def
+  
+  % <str>|<array of str> <index> .cjkv_biggetu16 <integer>
+  /.cjkv_biggetu16 {
+    2 .cjkv_biggetinterval 0 .cjkv_getu16
+  } bind def
+  
+  % <str>|<array of str> <index> .cjkv_biggetu32 <integer>
+  /.cjkv_biggetu32 {
+    4 .cjkv_biggetinterval 0 .cjkv_getu32
+  } bind def
+  
+  % <string> .cjkv_strtoint <integer>
+  /.cjkv_strtoint {
+    0 exch { exch 8 bitshift add } forall
+  } bind def
+  
+  % <nametable> <nameid> findname <string> true
+  % <nametable> <nameid> findname false
+  /.cjkv_findname {
+    CJKV_DEBUG_BASE { (findname: ) print dup =only  } if
+    false 3 1 roll 0 1 3 index 2 .cjkv_getu16 1 sub {
+                  % Stack: false table id index
+      12 mul 6 add 2 index exch 12 getinterval
+      dup 6 .cjkv_getu16 2 index eq {
+                  % We found the name we want.
+        exch pop
+                  % Stack: false table record
+        dup 10 .cjkv_getu16 2 index 4 .cjkv_getu16 add
+        1 index 8 .cjkv_getu16 4 -1 roll 3 1 roll getinterval exch
+                  % Stack: false string record
+                  % Check for 8- vs. 16-bit characters.
+        .cjkv_is2byte { .cjkv_string2to1 } if true null 4 -1 roll exit
+      } if pop
+    } for pop pop
+    CJKV_DEBUG_BASE {
+      dup { ( = ) print 1 index == } { ( not found) = } ifelse
+    } if
+  } bind def
+  
+  % <namerecord> .cjkv_is2byte <bool>
+  /.cjkv_is2byte {
+    dup 0 .cjkv_getu16 {
+      { pop true }                % Apple Unicode
+      { pop false }               % Macintosh Script manager
+      { 1 .cjkv_getu16 1 eq }           % ISO
+      { 1 .cjkv_getu16 1 eq }           % Microsoft
+    } exch get exec
+  } bind def
+  
+  % <string2> string2to1 <string>
+  /.cjkv_string2to1 {
+    dup length 2 idiv string dup
+    0 1 3 index length 1 sub {
+      3 index 1 index 2 mul 1 add get put dup
+    } for pop exch pop
+  } bind def
+  
+
+  % <array> <lt-proc> .cjkv_sort <array>
+  /.cjkv_sort {
+    1 index length 1 sub -1 1 {
+      2 index exch 2 copy get 3 copy      % arr proc arr i arr[i] arr i arr[i]
+      0 1 3 index 1 sub {
+        3 index 1 index get       % arr proc arr i arr[i] arr imax amax j arr[j]
+        2 index 1 index 10 index exec {   % ... amax < arr[j]
+          4 2 roll
+        } if pop pop
+      } for                       % arr proc arr i arr[i] arr imax amax
+      4 -1 roll exch 4 1 roll put put
+    } for pop
+  } def
+  
+  
+  % <array|string> <index> <count> .cjkv_safegetinterval <subarray|substring>
+  /.cjkv_safegetinterval {
+    exch 2 index length .min exch
+    2 index length 2 index sub .min
+    getinterval
+  } bind def
+  
+  % <array> <index> <obj> .cjkv_safeput -
+  /.cjkv_safeput {
+    2 index length 2 index gt { put } { pop pop pop } ifelse
+  } bind def
+  
+  % Each procedure in this dictionary is called as follows:
+  %       <encodingtable> proc <glypharray>
+  /_cjkv_cmapformats mark
+    0 {		% Apple standard 1-to-1 mapping.
+      6 256 getinterval { } forall 256 packedarray
+    } bind
+    2 {		% Apple 16bit CJK (ShiftJIS etc)
+  
+      % /sHK_sz		subHeaderKey_size	% 1 * uint16
+      % /sH_sz		subHeader_size		% 4 * uint16
+      % /sH_len		subHeader_length
+      % /cmapf2_tblen	total table length
+      % /cmapf2_lang	language code (not used)
+      % /sHKs		subHeaderKeys
+  
+      /sHK_sz 2 def
+      /sH_sz 8 def
+      dup 2 .cjkv_getu16 /cmapf2_tblen exch def
+  
+      CJKV_DEBUG_BASE {
+         (format2 table length: 0x) print
+         cmapf2_tblen 16 10 string cvrs print
+         (=) print
+         cmapf2_tblen == flush
+      } if
+      dup 4 .cjkv_getu16 /cmapf2_lang exch def
+  
+      CJKV_DEBUG_BASE {
+         (format2 lang code: 0x) print
+         cmapf2_lang 16 10 string cvrs == flush
+      } if
+      dup 6 256 sHK_sz mul getinterval /sHKs exch def
+      CJKV_DEBUG_BASE {
+         (format2 subHeaderKeys: ) print
+         sHKs == flush
+         (scan subHeaderKeys\n) print flush
+      } if
+  
+      0		% initialization value for /sH_len
+      0 1 255 {
+         CJKV_DEBUG_BASE {
+            (hi byte ) =only
+            dup 16 10 string cvrs =only
+            (-> subHeader #) print
+            flush
+         } if
+         sHKs exch
+         2 mul .cjkv_getu16
+         CJKV_DEBUG_BASE {
+            dup 16 10 string cvrs =only
+            ( ) print dup == flush
+         } if
+         1 index	% get current max
+         1 index	% get current subHeaderKey
+         lt {exch} if pop
+      } for
+      /sH_len exch def
+  
+      CJKV_DEBUG_BASE {
+        (format2 subHeader length: ) print
+        sH_len ==
+        flush
+      } if
+      dup 6 256 sHK_sz mul add
+      cmapf2_tblen 1 index sub getinterval
+      /sH_gIA exch def
+      CJKV_DEBUG_BASE {
+         (format2 subHeaders + GID array: ) print
+         sH_gIA ==
+      } if
+  
+      /cmapf2_glyph_array 65535 array def
+  
+      /.cmapf2_putGID {
+          /cmapf2_ch cmapf2_ch_hi 8 bitshift cmapf2_ch_lo add def
+          CJKV_DEBUG_BASE {
+              (code: ) =only cmapf2_ch 16 4 string cvrs =only
+              ( -> ) =only
+          } if
+          firstCode cmapf2_ch_lo le
+          cmapf2_ch_lo firstCode entryCount add lt
+          and { % true: j is inside
+              sH_offset idRangeOffset add		% offset to gI
+              cmapf2_ch_lo firstCode sub 2 mul	% rel. pos. in range
+              add 6 add				% offset in sH_gIA
+              sH_gIA exch .cjkv_getu16
+              dup 0 gt { % 
+                  CJKV_DEBUG_BASE {
+                      dup 16 8 string cvrs =only
+                      (+) =only idDelta 16 8 string cvrs =only
+                  } if
+                  idDelta add
+                  CJKV_DEBUG_BASE {
+                      (=) =only dup 16 8 string cvrs == flush
+                  } if
+                  cmapf2_glyph_array exch cmapf2_ch exch put
+              } {
+                  CJKV_DEBUG_BASE {(specified 0: 0\n) print flush} if
+                  pop
+                  % cmapf2_glyph_array cmapf2_ch 0 put
+              } ifelse
+          } {   % false: j is outside
+              CJKV_DEBUG_BASE {(outside of range: 0\n) print flush} if
+              % cmapf2_glyph_array cmapf2_ch 0 put
+          } ifelse
+      } def
+  
+      16#00 1 16#ff { % hi_byte scan
+          /cmapf2_ch_hi exch def
+          sHKs cmapf2_ch_hi sHK_sz mul .cjkv_getu16
+          CJKV_DEBUG_BASE {
+              (subHeader_offset = idx * 8 = ) print
+              dup ==
+          } if
+          /sH_offset exch def
+          sH_gIA sH_offset sH_sz getinterval
+              dup 0 .cjkv_getu16 /firstCode exch def
+              dup 2 .cjkv_getu16 /entryCount exch def
+              dup 4 .cjkv_gets16 /idDelta exch def
+              dup 6 .cjkv_getu16 /idRangeOffset exch def
+          pop
+          CJKV_DEBUG_BASE {
+             (idRangeOffset: ) print idRangeOffset 16 8 string cvrs ==
+          } if
+          sH_offset 0 eq {
+             /cmapf2_ch_lo cmapf2_ch_hi def
+             /cmapf2_ch_hi 0 def
+             .cmapf2_putGID
+          } {
+             16#00 1 16#ff { % lo_byte scan
+                 /cmapf2_ch_lo exch def
+                 .cmapf2_putGID
+             } for
+          } ifelse
+       } for
+       pop
+       0 1 cmapf2_glyph_array length 1 sub { % rewrite null -> 0.
+          % CJKV_DEBUG_BASE { (rewriting null: ) print dup == flush } if
+          dup cmapf2_glyph_array exch get
+          null eq { cmapf2_glyph_array exch 0 put } {pop} ifelse 
+       } for
+       CJKV_DEBUG_BASE { (rewriting finished\n) print flush } if
+       cmapf2_glyph_array
+       CJKV_DEBUG_BASE {
+         16#0000 16#0010 16#fff0 {
+            16#0000 16#0001 16#000f {
+               1 index add dup 16#ffff lt {
+                 2 index exch get =only
+                 ( ) =only
+               } { pop } ifelse
+            } for
+            pop
+            (\n) print flush
+         } for
+       } if
+    } bind
+    4 {		% Microsoft/Adobe segmented mapping.
+      /etab exch _cjkv_ttcmap_tmp 3 1 roll put
+      /nseg2 _cjkv_ttcmap_tmp /etab get 6 .cjkv_biggetu16 def
+      14 /endc _cjkv_ttcmap_tmp /etab get 2 index nseg2 .cjkv_biggetinterval _cjkv_ttcmap_tmp 3 1 roll put
+  		% The Apple TrueType documentation omits the 2-byte
+  		% 'reserved pad' that follows the endCount vector!
+      2 add
+      nseg2 add /startc _cjkv_ttcmap_tmp /etab get 2 index nseg2 .cjkv_biggetinterval _cjkv_ttcmap_tmp 3 1 roll put
+      nseg2 add /iddelta _cjkv_ttcmap_tmp /etab get 2 index nseg2 .cjkv_biggetinterval _cjkv_ttcmap_tmp 3 1 roll put
+      nseg2 add /idroff _cjkv_ttcmap_tmp /etab get 2 index nseg2 .cjkv_biggetinterval  _cjkv_ttcmap_tmp 3 1 roll put
+  		% The following hack allows us to properly handle
+  		% idiosyncratic fonts that start at 0xf000:
+      pop
+      /firstcode _cjkv_ttcmap_tmp /startc get 0 .cjkv_getu16 16#ff00 and dup 16#f000 ne { pop 0 } if def
+      _cjkv_ttcmap_tmp /putglyph {
+        glyphs code 3 -1 roll put /code code 1 add def
+      } bind put
+  		% Do a first pass to compute the size of the glyphs array.
+      /numcodes 0 def /glyphs 0 0 2 nseg2 3 sub {
+  		% Stack: /glyphs numglyphs i2
+        /i2 exch def
+        /scode _cjkv_ttcmap_tmp /startc get i2 .cjkv_biggetu16 def
+        /ecode _cjkv_ttcmap_tmp /endc get i2 .cjkv_biggetu16 def
+        numcodes scode firstcode sub
+  		% Hack for fonts that have only 0x0000 and 0xf000 ranges
+        %dup 16#e000 ge { 255 and } if
+        % the previous line is obstructive to CJK fonts, so it was removed
+        exch sub 0 .max ecode scode sub 1 add add
+        exch 1 index add exch
+        numcodes add /numcodes exch def
+      } for array def
+  		% Now fill in the array.
+      /numcodes 0 def /code 0 def
+      0 2 nseg2 3 sub {
+        /i2 exch def
+        /scode _cjkv_ttcmap_tmp /startc get i2 .cjkv_getu16 def
+        /ecode _cjkv_ttcmap_tmp /endc get i2 .cjkv_getu16 def
+        numcodes scode firstcode sub
+  		% Hack for fonts that have only 0x0000 and 0xf000 ranges
+        %dup 16#e000 ge { 255 and } if
+        % the previous line is obstructive to CJK fonts, so it was removed
+        exch sub 0 .max dup { 0 _cjkv_ttcmap_tmp /putglyph get exec } repeat
+        ecode scode sub 1 add add numcodes add /numcodes exch def
+        /delta _cjkv_ttcmap_tmp /iddelta get i2 .cjkv_gets16 def
+        CJKV_DEBUG_BASE {
+  	(scode=) print scode =only
+  	( ecode=) print ecode =only
+  	( delta=) print delta =only
+  	( droff=) print _cjkv_ttcmap_tmp /idroff get i2 .cjkv_biggetu16 =
+        } if
+        _cjkv_ttcmap_tmp /idroff get i2 .cjkv_biggetu16 dup 0 eq {
+  	pop scode delta add 65535 and 1 ecode delta add 65535 and
+  	{ _cjkv_ttcmap_tmp /putglyph get exec } for
+        } {	% The +2 is for the 'reserved pad'.
+          /gloff exch 14 nseg2 3 mul add 2 add i2 add add def
+          0 1 ecode scode sub {
+  	  2 mul gloff add _cjkv_ttcmap_tmp /etab get exch .cjkv_biggetu16
+  	  dup 0 ne { delta add 65535 and } if _cjkv_ttcmap_tmp /putglyph get exec
+  	} for
+        } ifelse
+      } for glyphs /glyphs null def	% for GC
+    } bind
+    6 {		% Single interval lookup.
+      dup 6 .cjkv_getu16 /firstcode exch def dup 8 .cjkv_getu16 /ng exch def
+      firstcode ng add array
+  		% Stack: tab array
+  		% Fill elements 0 .. firstcode-1 with 0
+      0 1 firstcode 1 sub { 2 copy 0 put pop } for
+      dup firstcode ng getinterval
+  		% Stack: tab array subarray
+  		% Fill elements firstcode .. firstcode+nvalue-1 with glyph values
+      0 1 ng 1 sub {
+        dup 2 mul 10 add 4 index exch .cjkv_getu16 3 copy put pop pop
+      } for pop exch pop
+    } bind
+  .dicttomark readonly def                % _cjkv_cmapformats
+  
+  % <cmaptab> _cjkv_cmaparray <glypharray>
+  /_cjkv_cmaparray {
+    dup 0 .cjkv_biggetu16
+  
+    _cjkv_cmapformats exch .knownget {
+      CJKV_DEBUG_BASE {
+        (cmap: format ) print 1 index 0 .cjkv_biggetu16 = flush
+      } if exec
+    } {
+      (Can't handle format ) print 0 .cjkv_biggetu16 = flush
+      0 1 255 { } for 256 packedarray
+    } ifelse
+    CJKV_DEBUG_BASE {
+      (cmap: length=) print dup length = dup ==
+    } if
+  } bind def
+  
+  % Each procedure in this dictionary is called as follows:
+  %	<file> <length> -proc- <string|array_of_strings>
+  % Note that each table must have an even length, because of a strange
+  % Adobe requirement that each sfnts entry have even length.
+  /_cjkv_readtables mark
+  	% Ordinary tables
+    (head) { .cjkv_readtable }
+    (hhea) { .cjkv_readtable }
+    (maxp) { .cjkv_readtable }
+    (name) { .cjkv_readtable }
+    (OS/2) { .cjkv_readtable }
+    (vhea) { .cjkv_readtable }
+  	% Big tables
+    (cmap) { .cjkv_readbigtable }
+    (glyf) { .cjkv_readbigtable }
+    (loca) { .cjkv_readbigtable }
+    (hmtx) { .cjkv_readbigtable }
+    (vmtx) { .cjkv_readbigtable }
+    (post) { .cjkv_readbigtable }
+  	% Tables only needed for embedding in PDF files
+    (cvt ) { .cjkv_readtable }
+    (fpgm) { .cjkv_readtable }
+    (prep) { .cjkv_readtable }
+    (GSUB) { .cjkv_readtable }
+  .dicttomark
+  % Normally there would be a 'readonly' here, but the ttf2pf utility wants
+  % to include the 'kern' table as well, so we leave the readtables dictionary
+  % writable.
+  def                % readtables
+
+  % Read a table as a single string.
+  % <file> <length> .readtable <string>
+  /.cjkv_readtable {
+    dup dup 1 and add string
+                  % Stack: f len str
+    dup 0 4 -1 roll getinterval
+                  % Stack: f str str1
+          % Because of the absurd PostScript specification that gives an
+          % error for reading into an empty string, we have to check for
+          % this explicitly here.
+    3 -1 roll exch
+    dup () ne { readstring } if pop pop
+  } bind def
+  
+  % Read a big table (one that may exceed 64K).
+  % <file> <length> .readbigtable <string[s]>
+  /.cjkv_readbigtable {
+    dup 65400 lt {
+      .cjkv_readtable
+    } {
+      currentuserparams /VMReclaim get -2 vmreclaim
+      [ 4 2 roll {
+                  % Stack: mark ... f left
+        dup maxstring le { exit } if
+        1 index maxstring string readstring pop 3 1 roll maxstring sub
+      } loop .cjkv_readtable ]
+      exch vmreclaim
+    } ifelse
+  } bind def
+end readonly def % /_cjkv_base_util

Added: trunk/gs/lib/cjkv/cjkcidcm.ps
===================================================================
--- trunk/gs/lib/cjkv/cjkcidcm.ps	2007-08-12 17:29:29 UTC (rev 8184)
+++ trunk/gs/lib/cjkv/cjkcidcm.ps	2007-08-13 10:08:05 UTC (rev 8185)
@@ -0,0 +1,455 @@
+%!
+%
+% Developed by AXE,Inc., BBR Inc. and Turbolinux Inc.
+%   under the technical advice by suzuki toshiya (Hiroshima University)
+% For questions, please send mail to espgs8-cjk at printing-japan.org
+%
+% (C) Copyright 2006 Center of the International Cooperation for
+%     Computerization
+%
+%
+% Based on gs-cjk patches
+% Copyright (C) 2001-2003 gs-cjk project:
+%   Taiji Yamada, Masatake Yamato, Hideyuki Suzuki and suzuki toshiya.
+%   All rights reserved.
+%
+%
+% Based on GNU Ghostscript 7.07 and 8.15
+% Copyright (C) 1996-2003 artofcode LLC.  All rights reserved.
+%
+% This software is provided AS-IS with no warranty, either express or
+% implied.
+%
+%
+% This program is free software;  you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation; either version 2 of
+% the License, or (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+% See the GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; if not, write to the Free Software Foundation,
+% Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+%
+
+true setglobal
+
+[
+   /CJKV_DEBUG_CIDCM
+   /NOCIDFONTMAP
+] {dup where {pop pop} { currentdict exch false def pop } ifelse} forall
+
+% -------------------------------------------------------------------------------
+% taken from gs7.05/lib/gs_cidcm.ps
+
+25 dict begin
+
+  /.prs_dict currentdict def
+  /.prs_empty 0 dict readonly def
+  /enable_cache true def
+  /path_buffer 8192 string def
+  /name_buffer 1024 string def
+  /minus (-) 0 get def             % character code