vine-users ML アーカイブ



[vine-users:062065] ghostscript 日本語の記入方法

  • From: WATANABE Kazufumi <folly_lazy@xxxxxxxxx>
  • Subject: [vine-users:062065] ghostscript 日本語の記入方法
  • Date: Mon, 01 Sep 2003 14:38:16 +0900
いつもありがとうございます、渡辺です。

HylaFax4.1.7
を使いFaxServerを構築し、Windowsクライアントから
WHFCを使ってデータ送信しています。

Apple Laserwriter 12/640 PSドライバを使用しプリンタ登録し、
印刷する要領で送信します。

このとき送信状(FaxCoverSheet)をつけて送信しようということで
WHFCフォルダにfaxcover.psを持ってきて送信してみたのですが、
どうやらこのPostScriptファイルではフォントの設定が悪いのか
日本語が表示出来ません。
日本語対応faxcover.psを作ろうと思っていろいろやっているのですが
どうしても日本語が化けてしまいます。

このような場合、どこをどう変更して修正していくべきなのでしょうか。
Vineのgsは5.5と、少し古いというような情報を得たので
http://radar.sci.hokudai.ac.jp/~kato/computer/Linux/printer/standard.html
で公開されていた情報を元に7.05にしてみたものの根本的には
解決出来ておりません。
ご意見いただければ幸いです。

----以下faxcover_ja.ps----(うまくいかない
%!PS-Adobe-2.0 EPSF-2.0
% Edit /orig-line1 - /orig-line10 to suit your needs.
% text goes inside of the ()
%%EndComments
/orig-line1 () def
/orig-line2 () def
/orig-line3 () def
/orig-line4 () def
/orig-line5 () def
/orig-line6 () def
/orig-line7 () def
/orig-line8 () def
/orig-line9 () def
/orig-line10 () def
%%EndProlog
%%Trailer
%!PS-Adobe-2.0 EPSF-2.0
%%BoundingBox: 21 3 588 788
%%Title: 
%%CreationDate: 11:05 AM January  4, 1993
%%Pages: 1 +1
%%EndComments
%	$Id: faxcover.ps,v 1.5 2003/04/22 22:55:15 tim Exp $
%
% HylaFAX Facsimile Software
%
% Copyright (c) 1990-1996 Sam Leffler
% Copyright (c) 1991-1996 Silicon Graphics, Inc.
% HylaFAX is a trademark of Silicon Graphics
% 
% Permission to use, copy, modify, distribute, and sell this software and 
% its documentation for any purpose is hereby granted without fee, provided
% that (i) the above copyright notices and this permission notice appear in
% all copies of the software and related documentation, and (ii) the names of
% Sam Leffler and Silicon Graphics may not be used in any advertising or
% publicity relating to the software without the specific, prior written
% permission of Sam Leffler and Silicon Graphics.
% 
% THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
% EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
% WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
% 
% IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
% ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
% OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
% WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
% LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
% OF THIS SOFTWARE.
%
1 setlinejoin
/nullstring () def
/IS {
    dup where {
	pop
	load dup nullstring ne {S} {pop} ifelse
    } {pop} ifelse
} bind def
/AL {
    dup where {
	pop
	load dup nullstring ne {S 0 -20 translate} {pop} ifelse
    } {pop} ifelse
} bind def
/M  { moveto } bind def /S { show  } bind def
/R { rmoveto } bind def /L { lineto } bind def
/B { newpath 0 0 M 0 1 L 1 1 L 1 0 L closepath } bind def
/CS { closepath stroke } bind def

/showcaseisoencoding [
/.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
/space /exclam /quotedbl /numbersign
/dollar /percent /ampersand /quoteright
/parenleft /parenright /asterisk /plus
/comma /minus /period /slash
/zero /one /two /three /four /five /six /seven
/eight /nine /colon /semicolon
/less /equal /greater /question
/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
/quoteleft /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 /guilsinglright
/fraction /florin /quotesingle /quotedblleft
/guilsinglleft /fi /fl /endash
/dagger /daggerdbl /bullet /quotesinglbase
/quotedblbase /quotedblright /ellipsis /trademark
/dotlessi /grave /acute /circumflex
/tilde /macron /breve /dotaccent
/dieresis /perthousand /ring /cedilla
/Ydieresis /hungarumlaut /ogonek /caron
/emdash /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
/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
/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 ] def
/Helvetica-Bold findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Helvetica-Bold-SHOWISO exch definefont pop
/Helvetica findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Helvetica-SHOWISO exch definefont pop
/Courier findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Courier-SHOWISO exch definefont pop
/Times-Bold findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Times-Bold-SHOWISO exch definefont pop
%%EndProlog
%%Page: label 1
newpath clippath pathbbox
/URy exch def
/URx exch def
/LLy exch def
/LLx exch def
/Width  URx LLx sub 0.005 sub def
/Height URy LLy sub 0.005 sub def
LLx LLy translate
Width 612 div Height 792 div gt
    { /Y_size Height def
      /X_size 612 792 div Y_size mul def
      /Scale Height 792 div def }
    { /X_size Width def
      /Y_size 792 612 div X_size mul def
      /Scale Width 612 div def } ifelse
Width  X_size sub 2 div
Height Y_size sub 2 div translate
Scale Scale scale
gsave
0 0 0 setrgbcolor
gsave
newpath
11.9999 3.00039 M -8.00007 787 L 618 787 L 618 3.00039 L
closepath clip newpath
/Helvetica-SHOWISO findfont 14 scalefont setfont

/drawtext {
gsave
 /Helvetica-Bold-SHOWISO findfont 18 scalefont setfont
 10 765 translate
 0 0 M /orig-line1 AL
 0 0 M /orig-line2 AL
 0 0 M /orig-line3 AL
 0 0 M /orig-line4 AL
 0 0 M /orig-line5 AL
 0 0 M /orig-line6 AL
 0 0 M /orig-line7 AL
 0 0 M /orig-line8 AL
 0 0 M /orig-line9 AL
 0 0 M /orig-line10 AL
grestore
} def

drawtext

0 0 0 setrgbcolor
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
%164.063 644 M 168.356 644 M (Applications Consulting) S
%gsave 164.063 642 M 442 642 L stroke grestore
/GothicBBB-Medium-H findfont 20 scalefont setfont
210.875 586 M (\044\042\044\044) S
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
176.222 499 M (To:) S
/Ryumin-Light-EUC-H findfont 20 scalefont setfont
226.744 499 M (________________________) S 226.744 499 M /to IS
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
58.3641 457 M (Fax Number:) S
%108.837 457 M (Number:) S
225.744 457 M (________________________) S 225.744 457 M /to-fax-number IS
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
95.5068 415 M (Company:) S
/GothicBBB-Medium-H findfont 20 scalefont setfont
225.744 415 M (________________________) S 225.744 415 M /to-company IS
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
146.199 373 M (From:) S
227.744 373 M (________________________) S 227.744 373 M /from IS
176.823 331 M (Re:) S
228.744 331 M (________________________) S 228.744 331 M /regarding IS
59.3601 289 M (Today's Date:) S
231.744 289 M (________________________) S 231.744 289 M /todays-date IS
31 247 M (# of pages to follow this sheet:) S
403.216 247 M (___________) S 403.216 247 M /page-count IS
/Helvetica-Bold-SHOWISO findfont 14 scalefont setfont
31 189 M (Comments:) S
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
/rule (_______________________________) def
/y 189 def /x 141.336 def
y -29 73 { x exch M rule S } for
rule stringwidth pop 29 x y comments BreakIntoLines
grestore
grestore
showpage


-- 
WATANABE Kazufumi <folly_lazy@xxxxxxxxx>