Article View: comp.lang.postscript
Article #8140Re:Re: Encoding vectors/character sets
From: Timothy Hayes
Date: Thu, 23 Mar 1989 14:40
Date: Thu, 23 Mar 1989 14:40
143 lines
4118 bytes
4118 bytes
I am reposting this since I received no responses from
anyone at Adobe. I have received several messages from
other people in this newsgroup that are also keenly interested
in a solution.
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:
<4232408a.1830f@apollo.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ulowell!apollo!hayesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!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: <4232408a.1830f@apollo.COM> Date: 23 Mar 89 14:40:00 GMT Organization: Apollo Computer, Chelmsford, Mass. Lines: 143