From owner-FreeBSD-users-jp@jp.freebsd.org  Fri Oct 17 13:36:23 1997
Received: by jaz.jp.freebsd.org (8.8.7+2.7Wbeta7/8.7.3) id NAA07287
	Fri, 17 Oct 1997 13:36:23 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.7+2.7Wbeta7/8.7.3) with ESMTP id NAA07281
	for <FreeBSD-users-jp@jp.freebsd.org>; Fri, 17 Oct 1997 13:36:22 +0900 (JST)
Received: from alcedo.falcon.cs.ritsumei.ac.jp by csgw.cs.ritsumei.ac.jp (8.8.7+2.7Wbeta7/3.6Wbeta6-csgw) id NAA29134; Fri, 17 Oct 1997 13:36:21 +0900 (JST)
Received: from falcon.cs.ritsumei.ac.jp (alcedo.falcon.cs.ritsumei.ac.jp [133.19.62.1]) by alcedo.falcon.cs.ritsumei.ac.jp (8.8.7/3.5Wpl7falcon) with ESMTP id NAA00506 for <FreeBSD-users-jp@jp.freebsd.org>; Fri, 17 Oct 1997 13:36:20 +0900 (JST)
Message-Id: <199710170436.NAA00506@alcedo.falcon.cs.ritsumei.ac.jp>
To: FreeBSD-users-jp@jp.freebsd.org
In-reply-to: Your message of "Thu, 16 Oct 1997 23:00:37 JST."
             <199710161400.XAA08718@melchior.q.t.u-tokyo.ac.jp> 
Date: Fri, 17 Oct 1997 13:36:19 +0900
From: Ryuichi Hino <ryuichi@falcon.cs.ritsumei.ac.jp>
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=20]
X-Sequence: FreeBSD-users-jp 19386
Subject: [FreeBSD-users-jp 19386] Re: Print tex with eps 
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

$BF|Ln!wN)L?4[Bg$G$9!#(B

>   $BAR66!wElBg$G$9!#(B
> 
> On Thu Oct 16 1997 16:46:01
> 	ryuichi@falcon.cs.ritsumei.ac.jp wrote in <199710160746.QAA27019@alcedo.falcon.cs.ritsumei.ac.jp> :
> 
> + $B$9$$$^$;$s!#$=$N%Q%C%A$NF~<jJ}K!$r65$($F2<$5$$!#(B
> + $B$^$?!"$I$N$h$&$K;H$($P$$$$$s$G$7$g$&$+!#(B
> 
>   fj $BFI$a$^$9$+(B? ($BBg3X$@$+$iBg>fIW$@$H;W$$$^$9$,(B)
>   $BFI$a$k$h$&$J$i!"(Bfj.comp.dev.printer/fj.questions.unix $B$N(B
> 
>   <61rt22$724@ews19.krhm.jvc-victor.co.jp>
>   <61smkj$21n@ews19.krhm.jvc-victor.co.jp>
> 
> $B;2>H$7$F2<$5$$!#(B
> -- 
> $BAR66(B  $BCRI'(B                  E-Mail  : kura@melchior.q.t.u-tokyo.ac.jp
> Tomohiko Kurahashi          HomePage: http://selina.q.t.u-tokyo.ac.jp/~kura/

$B$=$l$C$F!"0J2<$N$b$N$G$9$+(B?

ports $B$G(B make patch $B$^$G$7$F!"$3$N%Q%C%A$r(B works/ $B$G;H$$!"(B
make; make install $B$7$^$7$?$,!"$d$C$Q$jBLL\$G$7$?!#(B
(.obj $B%U%!%$%k$r(B open $B$7$F!"(B.eps $B$r(B print $B$7$J$*$7$?!#(B)

---------------------------

From: e-nakagw@krhm.jvc-victor.co.jp
Newsgroups: fj.questions.unix,fj.comp.dev.printer,fj.sources
Subject: tgif-3.0J0.12-p13-PSJIS.diff(Re: [Q] PostScript PRINTER $B$N(B)
Date: Mon, 13 Oct 1997 17:37:39 JST
Organization: Uninet is an independent site

$BCf@n!w#J#V#C$G$9!#(B

<61rt22$724@ews19.krhm.jvc-victor.co.jp>$B$N5-;v$K$*$$$F(B
e-nakagw@krhm.jvc-victor.co.jp$B$O=q$-$^$7$?!#(B

>> $BB>$K$b$3$N%Q%C%A$rC5$7$F$$$kJ}$b$*$i$l$?MM$J$N$G!"8=:_!"?{Ln$5$s$K(B
>> fj.sources$B$KEj9F$7$F$bNI$$$+3NG'$r<h$C$F$$$k$H$3$m$G$9!#(B

$B:n<T$N?{Ln$5$s$N>5G'$rF@$^$7$?$N$G!"0J2<$N(Bpatch$B$rEj9F$$$?$7$^$9!#(B
$BK\7o$K4X$7$F?{Ln$5$s$*$h$SM-1W$J>pJs$rD:$$$?J}!9$K$O$3$N>l$r$+$j$F?<$/(B
$B46<U?=$7>e$2$^$9!#(B

$BCf@n(B  e-nakagw@krhm.jvc-victor.co.jp

$B!]!]!]!]!]$3$3$+$i$,%Q%C%A$G$9!#!]!]!]!]!]!]!]!]!]!]!]!](B
  $B$3$N%Q%C%A$O!"(Btgif-3.0J0.12-p13-patch.gz $B$rEv$F$?(B tgif 3.0-p13 $B$N(B
PostScript $B=PNO$NF|K\8l%3!<%I$r(B EUC $B$+$i(B JIS $B$KJQ99$9$k$b$N$G$9!#(B
  ps.c $B$N(B psKanjiFontMacro $B$r(B JIS $B%3!<%I$G%(%9%1!<%W%^%C%T%s%0=PNO$K(B
$BBP1~$9$k$h$&$KJQ99$7!"ITMW$K$J$C$?(B copyfont $B$r:o=|!"(Btest.c $B$N(B PostScript
$B=PNOItJ,$r(B JIS $B$KBP1~$9$k$h$&$KJQ99$7$F$$$^$9!#(B

  $B$3$N%Q%C%A$rEv$F$k$3$H$K$h$j!"(Btgif $B$N=PNO%U%!%$%k$,(B EUC$B%3!<%I$N<h07$$$K(B
$BLdBj$,$"$k0lIt$N%W%j%s%?!<$d(B Adobe Acrobat 3.0j $B$G<h07$($k$h$&$K$J$j$^$9!#(B
  $B$^$?!"(BEUC $B%3!<%I$r<h07$($k%W%j%s%?!<$G$b!"K\%Q%C%A$K$h$k0-1F6A$O!"(B
$B86M}>e$J$$$O$:$G$9!#(B

  $B$J$*!"F|K\8l=PNO4X78$N%j%=!<%9$N%G%U%)%k%HCM$O!"(BJIS $B2=$7$?$3$H$K$h$j(B
EUC $B$+$i(B JIS $B$KJQ99$7$F$$$^$9!#(B

   1997 Aug. 9th              $B?{Ln(B $B?-0l(B / kanno@jn1jdz.ymt.prug.or.jp

diff -cN tgif-3.0-p13/auxtext.c tgif-3.0-p13-PSJIS/auxtext.c

*** tgif-3.0-p13/auxtext.c      Sat Aug  9 00:45:15 1997
--- tgif-3.0-p13-PSJIS/auxtext.c        Sat Aug  9 00:43:57 1997
***************
*** 1405,1411 ****
     else {
        if(!IsDefinedEucFont(font_str)) {
            fprintf(FP, "%s %s /%s ", font_str, latin_font_str, kanji_font_str);
!           fprintf(FP, "eucfont\n");
   
           DefineEucFont(font_str);
        }
--- 1405,1411 ----
     else {
        if(!IsDefinedEucFont(font_str)) {
            fprintf(FP, "%s %s /%s ", font_str, latin_font_str, kanji_font_str);
!           fprintf(FP, "jisfont\n");
   
           DefineEucFont(font_str);
        }
diff -cN tgif-3.0-p13/font.c tgif-3.0-p13-PSJIS/font.c
*** tgif-3.0-p13/font.c Sat Aug  9 00:45:12 1997
--- tgif-3.0-p13-PSJIS/font.c   Sat Aug  9 00:43:57 1997
***************
*** 259,265 ****
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "Ryumin-Light-EUC-H",
        "Ryumin",
        FALSE,
        FALSE,
--- 259,265 ----
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "Ryumin-Light-H",
        "Ryumin",
        FALSE,
        FALSE,
***************
*** 270,276 ****
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "GothicBBB-Medium-EUC-H",
        "Gothic",
        FALSE,
        TRUE,
--- 270,276 ----
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "GothicBBB-Medium-H",
        "Gothic",
        FALSE,
        TRUE,
***************
*** 281,287 ****
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "Ryumin-Light-EUC-V",
        "Ryumin-V",
        TRUE,
        FALSE,
--- 281,287 ----
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "Ryumin-Light-V",
        "Ryumin-V",
        TRUE,
        FALSE,
***************
*** 292,298 ****
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "GothicBBB-Medium-EUC-V",
        "Gothic-V",
        TRUE,
        TRUE,
--- 292,298 ----
     { NULL,
        "fixed-medium-r-normal",
        "jisx0208.1983-*",
!       "GothicBBB-Medium-V",
        "Gothic-V",
        TRUE,
        TRUE,
diff -cN tgif-3.0-p13/ps.c tgif-3.0-p13-PSJIS/ps.c
*** tgif-3.0-p13/ps.c   Sat Aug  9 00:45:10 1997
--- tgif-3.0-p13-PSJIS/ps.c     Sat Aug  9 00:43:57 1997
***************
*** 250,303 ****
  
  static char *psKanjiFontMacro[] =
  {
!   "%%Title: eucfont.ps",
!   "% old eucfont.ps(OCFeucfont) and new eucfont.ps(CIDeucfont) were combined."
,
!   "%  1996-09, kawamata@sra.co.jp",
!   "% Sample Usage:",
!   "%   Operands are only font names permitted. Don't put fontdict itself.",
!   "% /Courier-Ryumin /Courier /Ryumin-Light-EUC-V eucfont",
!   "",
!   "%%Title: CIDeucfont.ps",
!   "%%Creator: yohtaki@cis.ibaraki.ac.jp",
!   "%%CreationDate: 1996-9-29",
    "%%EndComments",
-   "%",
-   "% <newfont> <asciifont> <kanjifont> CIDeucfont",
-   "/CIDeucfont {",
-   "dup findfont /WMode get 1 eq 4 1 roll % push direction info.",
-   "12 dict begin",
-   "  /CIDInit /ProcSet findresource begin",
-   "  exch [ 3 1 roll ] beginrearrangedfont",
-   "      3 -1 roll {   % pop direction info",
-   "         /WMode 1 def      % vertical font",
-   "         0 beginusematrix [ 0 1 -1 0 0 0.3 ] endusematrix",
-   "      } if",
-   "      1 usefont",
-   "      1 beginbfrange",
-   "         <00> <7F> <00>",
-   "       endbfrange",
-   "     endrearrangedfont",
-   "  end",
-   "end",
-   "} def",
    "",
!   "%%Title: OCFeucfont.ps",
!   "%%Creator: shikida@cs.titech.ac.jp, ueno@cs.titech.ac.jp",
!   "%%CreationDate: 1991-2-27",
!   "%%EndComments",
!   "% <font> OCFcopyfont <font>",
!   "/OCFcopyfont {",
!   "    dup maxlength 1 add dict begin",
!   "    {",
!   "   1 index /FID ne 2 index /UniqueID ne and",
!   "   {def} {pop pop} ifelse",
!   "    } forall",
!   "    currentdict",
!   "    end",
!   "} bind def",
!   "% <newfont> <asciifont> <kanjifont> OCFeucfont",
!   "/OCFeucfont {",
!   "      12 dict begin",
    "   dup type /nametype eq { findfont } if",
    "   dup /WMode known {",
    "       dup /WMode get /WMode exch def",
--- 250,265 ----
  
  static char *psKanjiFontMacro[] =
  {
!   "%%Title: jisfont.ps",
!   "%%Creator: kanno@jn1jdz.ymt.prug.or.jp",
!   "%%CreationDate: 1997-7-20",
    "%%EndComments",
    "",
!   "% based on eucfont.ps (1991-2-27) by shikida@cs.titech.ac.jp, ueno@cs.titec
h.ac.jp",
!   "",
!   "% <newfont> <asciifont> <kanjifont> jisfont",
!   "/jisfont {",
!   "    12 dict begin",
    "   dup type /nametype eq { findfont } if",
    "   dup /WMode known {",
    "       dup /WMode get /WMode exch def",
***************
*** 305,322 ****
    "           [0.0 1.0 -1.0 0.0 0.0 0.30] makefont",
    "       } if",
    "   } if",
-   "   OCFcopyfont dup begin",
-   "       /Encoding Encoding",
-   "       FMapType dup 2 eq {",
-   "           pop 128 128",
-   "       } { 5 eq {",
-   "           256 256",
-   "       } {",
-   "           /compositefont errordict /invalidfont get exec",
-   "       } ifelse",
-   "       } ifelse",
-   "       getinterval def",
-   "   end",
    "   /kanjifont exch definefont",
    "   exch",
    "",
--- 267,272 ----
***************
*** 325,331 ****
    "",
    "   /FDepVector [ 4 2 roll ] def",
    "   /FontType 0 def",
!   "   /FMapType 4 def",
    "   /FontMatrix matrix def",
    "   /Encoding [ 0 1 ] def",
    "   /FontBBox {0 0 0 0} def",
--- 275,281 ----
    "",
    "   /FDepVector [ 4 2 roll ] def",
    "   /FontType 0 def",
!   "   /FMapType 3 def",
    "   /FontMatrix matrix def",
    "   /Encoding [ 0 1 ] def",
    "   /FontBBox {0 0 0 0} def",
***************
*** 335,347 ****
    "    definefont pop",
    "} def",
    "",
-   "% <newfont> <asciifont> <kanjifont> eucfont",
-   "/eucfont {",
-   "   dup findfont",
-   "   /FMapType get 9 eq",
-   "           { CIDeucfont}",
-   "           { OCFeucfont} ifelse",
-   "} def",
    NULL
  };
  
--- 285,290 ----
diff -cN tgif-3.0-p13/text.c tgif-3.0-p13-PSJIS/text.c
*** tgif-3.0-p13/text.c Sat Aug  9 00:45:08 1997
--- tgif-3.0-p13-PSJIS/text.c   Sat Aug  9 00:43:58 1997
***************
*** 3402,3407 ****
--- 3402,3408 ----
     register char      * Str;
  {
     register char      * c_ptr;
+    register int               inkanji = 0;
  
     for ( ; *Str != '\0'; Str++)
     {
***************
*** 3409,3430 ****
        {
           case '(':
           case ')':
!          case '\\': fprintf (FP, "\\"); break;
        }
        if ((*Str) & 0x80)
        {
           if (FontIndex != FONT_SYM && KanjiFontIndex == KANJI_FONT_NONE && (c_
ptr = CharCodeTranslate (Str)) != NULL)
           {
              if (*c_ptr == '\\')
                 fprintf (FP, "%s", c_ptr);
              else if (*c_ptr == '8')
                 fprintf (FP, "\\%c%c%c", c_ptr[2], c_ptr[3], c_ptr[4]);
           }
!          else
!             fprintf (FP, "\\%o", (*Str)&0xff);
        }
!       else
           fprintf (FP, "%c", *Str);
     }
  }
  
--- 3410,3438 ----
        {
           case '(':
           case ')':
!          case '\\':
!               if (inkanji) { fprintf(FP, "\\377\\000"); inkanji = 0; }
!               fprintf (FP, "\\"); break;
        }
        if ((*Str) & 0x80)
        {
           if (FontIndex != FONT_SYM && KanjiFontIndex == KANJI_FONT_NONE && (c_
ptr = CharCodeTranslate (Str)) != NULL)
           {
+             if (inkanji) { fprintf(FP, "\\377\\000"); inkanji = 0; }
              if (*c_ptr == '\\')
                 fprintf (FP, "%s", c_ptr);
              else if (*c_ptr == '8')
                 fprintf (FP, "\\%c%c%c", c_ptr[2], c_ptr[3], c_ptr[4]);
           }
!          else {
!             if (!inkanji) { fprintf(FP, "\\377\\001"); inkanji = 1; }
!             fprintf (FP, "\\%o", (*Str)&0x7f);
!          }
        }
!       else {
!          if (inkanji) { fprintf(FP, "\\377\\000"); inkanji = 0; }
           fprintf (FP, "%c", *Str);
+       }
     }
  }



----------------------

----------

       Return to Innocence       |   $BN)L?4[Bg3X(B $BM}9)3XIt(B $B>pJs3X2J#42s@8(B
                                 |    $B7W;;5!%M%C%H%o!<%/!J4_K\!K8&5f<<(B
                    By Curly M.C.|          $BF|LnN40l(B   Ryuichi Hino
      E-mail:ryuichi@falcon.cs.ritsumei.ac.jp
                http://www.falcon.cs.ritsumei.ac.jp/~ryuichi/index.html
