2
%%Title: Adobe-Japan2 CID-Keyed Fonts Character List
3
%%Creator: Taiji Yamada <taiji@aihara.co.jp> and gs-cjk project
4
%%Copyright: (C) 2001 Taiji Yamada and gs-cjk project
5
%%+ This script is part of GNU Ghostscript and is distributed under
6
%%+ the terms of the GNU General Public License. See the file COPYING
7
%%+ for more information.
11
% gs [-sF=HeiseiMin-W3H] [-daffix [-sAF=WadaMin-RegularH]] \
12
% [-dglyphshow- [-sI=Identity-H]] [-ddescent=200] all_aj2.ps
14
%%DocumentMedia: A4 595 842 0 white ()
19
------------------------------------------------------------------------\n\
20
This is a script to test CJK fonts such as CID-keyed fonts.\n\
21
If you have not done CID-keyed fonts installation and definitions at\n\
22
/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
23
this script can't work correctly.\n\
24
For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
26
If you throw this script into a printer, it requires PostScript 3\n\
27
printer and CID-keyed fonts specified in this script.\n\
28
------------------------------------------------------------------------\n) def
30
/notice*stdout 4 dict begin
31
/*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
35
/notice*page 5 dict begin
38
gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
40
*gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
43
/*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
44
/*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
45
/*close { grestore } def
50
product (Ghostscript) search not { pop } { pop pop pop QUIET not {
53
*gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
61
dup /Font resourcestatus { pop pop findfont } {
64
(Error in findfont: ) *echo-n dup *echo
71
/*CIDFont*findresource {
72
dup /CIDFont resourcestatus { pop pop /CIDFont findresource } {
75
(Error in /CIDFont findresource: ) *echo-n dup *echo
82
/orighandleerror errordict /handleerror get def
85
notice*page begin errordict begin $error begin
87
(Error of ) *echo-n errorname dup length string cvs *echo
95
/title (Adobe-Japan2 CID-Keyed Fonts Character List) def
104
/RW PW LM RM add sub NH div def
105
/RH PH TM BM add sub NV div def
106
/FS RW 3 mul 4 div def
107
/AFS RW 1 mul 4 div def
108
/unknowndef { exch dup where { pop pop pop } { exch def } ifelse } bind def
109
/F (WadaMin-RegularH) unknowndef
110
/affix false unknowndef
111
/AF (HeiseiMin-W3H) unknowndef
112
/descent 130 unknowndef
113
/glyphshow- false unknowndef
114
/fss { exch *CIDFont*findresource exch scalefont setfont } bind def
115
/concats { % [str ...] concats str
116
() exch dup length 1 sub -1 0 {
117
1 index exch get dup type /stringtype ne { dup length string cvs } if
118
3 -1 roll exch dup length 2 index length add string
119
dup dup 4 2 roll copy length 4 -1 roll putinterval exch
122
/composefontname { % font cmap composefontname font--cmap
123
[ 2 index (--) 3 index ] concats dup 3 -1 roll [ 5 -1 roll ] composefont pop
126
/I (Identity-H) unknowndef
127
/F F I composefontname def
128
affix { /AF AF I composefontname def } if
129
/fss { exch *findfont exch scalefont setfont } bind def
132
/glyphframe { % h oldx glyphframe -
134
currentpoint pop sub exch dup 0 exch descent mul 1000 div neg rmoveto
135
currentpoint 4 -2 roll rectstroke grestore
137
/box { % llx lly urx ury box -
138
3 index 3 index moveto exch 4 -1 roll sub 3 1 roll exch sub
139
currentpoint 4 -2 roll rectstroke
141
/charframe { % h string charframe -
143
stringwidth pop exch dup 0 exch descent mul 1000 div neg rmoveto
144
currentpoint 4 -2 roll rectstroke grestore
146
/pathframe { % string pathframe -
148
true charpath flattenpath pathbbox box grestore
151
/Helvetica findfont 11 scalefont setfont
152
LM BM 11 2 mul sub moveto title show ( - ) show F show
154
gsave /Helvetica findfont 5 scalefont setfont ( and ) show AF show grestore
156
PW RM sub BM 11 2 mul sub moveto p 3 string cvs show
178
[0 6067] % Adobe-Japan2-0
188
s 0 id 256 idiv put s 1 id 256 mod put
195
x FS add y FS sub moveto
198
AFS x FS add glyphframe
206
/Times-Roman findfont 7 scalefont setfont
207
x y FS sub FS descent mul 1000 div sub 7 sub moveto