~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to examples/cjk/gscjk_aj.ps

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%!PS-Adobe-3.0
2
 
%%Title: japanese-shift-jis encoding
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.
8
 
%%BoundingBox: 30 150 530 650
9
 
%%EndComments
10
 
%%BeginProlog
11
 
 
12
 
/*gs-cjk (\
13
 
------------------------------------------------------------------------\n\
14
 
This is a script to test CJK fonts such as CID-keyed fonts.\n\
15
 
If you have not done CID-keyed fonts installation and definitions at\n\
16
 
/Resource/CMap and CIDFnmap or /Resource/CIDFont of ghostscript, then\n\
17
 
this script can't work correctly.\n\
18
 
For details, please see README at http://www.gyve.org/gs-cjk/supplement.\n\
19
 
 
20
 
If you throw this script into a printer, it requires PostScript 3\n\
21
 
printer and CID-keyed fonts specified in this script.\n\
22
 
------------------------------------------------------------------------\n) def
23
 
 
24
 
/notice*stdout 4 dict begin
25
 
  /*open {} def /*echo-n { =only } def /*echo { = } def /*close { flush } def
26
 
  currentdict
27
 
end def
28
 
 
29
 
/notice*page 5 dict begin
30
 
  /*y 750 def
31
 
  /*open {
32
 
    gsave initmatrix /Courier findfont 11 scalefont setfont 50 *y moveto
33
 
    *y 750 eq {
34
 
      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
35
 
    } if
36
 
  } def
37
 
  /*echo-n { dup type /stringtype ne { dup length string cvs } if show } def
38
 
  /*echo { *echo-n /*y *y 11 sub def 50 *y moveto } def
39
 
  /*close { grestore } def
40
 
  currentdict
41
 
end def
42
 
 
43
 
/greeting*gs-cjk {
44
 
  product (Ghostscript) search not { pop } { pop pop pop QUIET not {
45
 
    notice*stdout begin
46
 
      *open
47
 
      *gs-cjk { (\n) search { *echo } { *echo-n exit } ifelse pop } loop
48
 
      *close
49
 
    end
50
 
  } if } ifelse
51
 
} bind def
52
 
greeting*gs-cjk
53
 
 
54
 
/*findfont {
55
 
  dup /Font resourcestatus { pop pop findfont } {
56
 
    notice*page begin
57
 
      *open
58
 
      (Error in findfont: ) *echo-n dup *echo
59
 
      *close
60
 
    end
61
 
    findfont
62
 
  } ifelse
63
 
} bind def
64
 
 
65
 
/orighandleerror errordict /handleerror get def
66
 
errordict begin
67
 
  /handleerror {
68
 
    notice*page begin errordict begin $error begin
69
 
      *open
70
 
      (Error of ) *echo-n errorname dup length string cvs *echo
71
 
      *close
72
 
      showpage
73
 
    end end end
74
 
    orighandleerror
75
 
  } bind def
76
 
end
77
 
%%EndProlog
78
 
/Ryumin-Light-RKSJ-V *findfont 25 scalefont setfont
79
 
500 625 moveto
80
 
(��M ���{�� �c���� ���) show
81
 
/Ryumin-Light-RKSJ-H *findfont 25 scalefont setfont
82
 
50 600 moveto
83
 
(��M Ghostscript) show
84
 
50 550 moveto
85
 
(���{�� Japanese) show
86
 
50 500 moveto
87
 
(������ horizontal writing) show
88
 
50 450 moveto
89
 
(��� Print) show
90
 
%
91
 
/Ryumin-Light-RKSJ-V *findfont [ 1 .3 0 1 0 0 ] makefont 20 scalefont setfont
92
 
100 275 moveto 20 2 div 0 rmoveto
93
 
(�Α�) dup stringwidth neg rmoveto show
94
 
/Ryumin-Light-RKSJ-H *findfont [ 1 0 .3 1 0 0 ] makefont 20 scalefont setfont
95
 
100 250 moveto
96
 
(�Α� Italic transformation) show
97
 
%
98
 
/Ryumin-Light-RKSJ-H *findfont 20 scalefont setfont
99
 
150 400 moveto
100
 
(Mincho Typeface ������) show
101
 
/GothicBBB-Medium-RKSJ-H *findfont 20 scalefont setfont
102
 
150 375 moveto
103
 
(Gothic Typeface �S�V�b�N��) show
104
 
%
105
 
/Times-Roman findfont 13 scalefont setfont
106
 
50 200 moveto
107
 
(* Japanese translation of "Ghostscript" is merely associative \
108
 
characters of these meanings.) show
109
 
50 200 13 sub moveto
110
 
(In Japanese articles, customarily we use just "Ghostscript" as it \
111
 
is.) show
112
 
showpage
113
 
%%Trailer
114
 
%%EOF