🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #8102

Re:Re: Encoding vectors/character sets

#8102
From: Timothy Hayes
Date: Tue, 14 Mar 1989 15:49
136 lines
3862 bytes
In article <624@adobe.UUCP> greid@adobe.com (Glenn Reid) writes:

>>In article <41e316e7.1830f@apollo.COM> hayes@apollo.COM (Timothy Hayes) writes:

>>just referencing their names in the encoding vector but they are
>>rendered as blanks.  My objective is to be compatible with the ISO 
>>latin1 set, which is *not* equivelent to Adobe's latin1 set.  Specifically,
>>the Adobe latin1 set is missing degree, plusminus andcopyrightserif.

>This is not true.  The Adobe ISOLatin1Encoding vector contains the
>names "degree", "plusminus", and "copyrightserif" and fully conforms to
>the ISO Latin-1 character set.  The character sets of the fonts (note
>that this can be different from the names in the encoding vector)  also
>contain descriptions for those characters in all interpreters in which
>the ISOLatin1Encoding vector is defined, and in all downloadable fonts
>since a couple of years ago.

>Perhaps you are not able to print them, which is a different problem
>from their not being available.  If you post the code you are trying to
>get to work, perhaps we can fix it for you.
 
I am slightly confused, is ISOLatin1Encoding an encoding vector that 
I should pass to ReEncodeSmall? I have enclosed the PostScript code I
used to try this but, ISOLatin1Encoding was not defined.

/reencsmalldict 36 dict def

/ReEncodeSmall
{  
   reencsmalldict begin
   /newcodesandnames exch def
   /newfontname exch def
   /basefontname exch def
   /basefontdict basefontname findfont def
   /newfont basefontdict maxlength dict def
   
   basefontdict
   {
      exch dup /FID ne
      {
         dup /Encoding eq
         {
            exch dup length array copy
            newfont 3 1 roll put
         }
         {  
            exch newfont 3 1 roll put
         } ifelse
      }
      {
         pop pop
      } ifelse
   } forall

   newfont /FontName newfontname put
   newcodesandnames aload pop

   newcodesandnames length 2 idiv
   {newfont /Encoding get 3 1 roll put}
   repeat

   newfontname newfont definefont pop

   end 
} def

/Courier /Courier-Foreign ISOLatin1Encoding ReEncodeSmall
/Courier-Foreign findfont 14 scalefont setfont
/char 1 string def
/nstr 3 string def

/newline
 { currentpoint 13 sub
   exch pop LM
   exch moveto } def

/prt-n                 % stack:code
 {nstr cvs show} def
 /prtchar               % stack:code
 { char 0
   3 -1 roll put
   char show } def

/PrintCodeandChar       % stack:code
 { dup prt-n
   (  ) show
   prtchar newline } def

144 708 moveto
(Courier-Foreign   14 point) show

/LM 72 def
LM 672 moveto
32 1 64 {PrintCodeandChar} for

/LM 144 def
LM 672 moveto
65 1 96 {PrintCodeandChar} for

/LM 216 def
LM 672 moveto
97 1 127 {PrintCodeandChar} for

/LM 288 def
LM 672 moveto
128 1 159 {PrintCodeandChar} for

/LM 360 def
LM 672 moveto
160 1 191 {PrintCodeandChar} for

/LM 432 def
LM 672 moveto
192 1 223 {PrintCodeandChar} for

/LM 504 def
LM 672 moveto
224 1 255 {PrintCodeandChar} for

showpage


If I am approaching this the wrong way, I have a few questions.

(1) How do I access the ISOLatin1Encoding encoding vector?
(2) Do I use a user-defined font, as you mentioned? If so, where
    does ISOLatin1Encoding fit in.
(3) What PostScript revision has it defined?
(4) Where can I find a list of all the names used in this encoding
    vector?
    
Thanks much for your help.

Tim Hayes, hayes@apollo.COM
Apollo Computer
===============
Technical Details
Message-ID: <42053a69.1830f@apollo.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!apollo!hayes

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ulowell!apollo!hayes
From: hayes@apollo.COM (Timothy Hayes)
Newsgroups: comp.lang.postscript
Subject: Re:Re: Encoding vectors/character sets
Message-ID: <42053a69.1830f@apollo.COM>
Date: 14 Mar 89 15:49:00 GMT
Organization: Apollo Computer, Chelmsford, Mass.
Lines: 136