hayes@apollo.COM (Timothy Hayes) (03/08/89)
Does anyone in this newgroup know anything about encoding vectors outside of the encoding example in the green book? Maybe I am posting to the wrong newgroup. I am trying to use the Reencodesmall example except I want to use glyphs from the Symbol set. I tried 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. My character set question is, How does one handle >8bit character sets? Rumor has it that Adobe has released a Kanji font, is this true? Any help from anyone would be greatly appreciated... Tim Hayes Apollo Computer ===============
hayes@apollo.COM (Timothy Hayes) (03/08/89)
*** UUCP problems. *** Does anyone know anything about font encoding vectors? I am trying to use Reencodsmall (from the green book) to encode glyphs from the Symbol set with glyphs from the Courier/Helvetica and Times families. The reason behind all of these machinations, is that the Adobe version of the latin1 set does not contain several of the ISO standard latin1 glyphs (e.g. degree, plusminus, copyright). When I place these names in the encoding vector they are rendered as blanks. Any ideas? Is Adobe planning to support >8bit character sets? Rumour has it that a Kanji font has been released. Is this true? How does one get around an encoding vector that is only 256 bytes, when there could be thousands of characters. Any ideas? Please let me know if this is the appropriate newsgroup, for this discussion. Thanks. Tim Hayes Apollo Computer =============== Tim Hayes Apollo Computer ===============
greid@adobe.com (Glenn Reid) (03/10/89)
In article <41e316e7.1830f@apollo.COM> hayes@apollo.COM (Timothy Hayes) writes: > Does anyone in this newgroup know anything about encoding vectors >outside of the encoding example in the green book? Maybe I am >posting to the wrong newgroup. I am trying to use the Reencodesmall >example except I want to use glyphs from the Symbol set. I tried You can't include characters from another font without making a user-defined font something like the one in the green book on page 145. >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. > My character set question is, How does one handle >8bit character >sets? Rumor has it that Adobe has released a Kanji font, is this >true? I posted a message a few weeks ago to this newsgroup describing the composite fonts mechanism. You can also get details on it by sending a message containing the line "send Documents compositefonts.ps" to the address "ps-file-server@adobe.com" -- Glenn Reid Adobe Systems Developer Tools & Strategies
hayes@apollo.COM (Timothy Hayes) (03/14/89)
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 ===============
greid@adobe.com (Glenn Reid) (03/16/89)
In article <42053a69.1830f@apollo.COM> hayes@apollo.COM (Timothy Hayes) writes: >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. Enclosed is the original program, slightly rewritten. It supplies the ISOLatin1Encoding vector if it is not already in ROM, and checks to see if the font you are trying to reencode contains the appropriate characters. It is possible to have the vector but not have the character set (newer printer, old downloadable font) or to have the character set but not have the vector (old printer, newer downloadable font). This upgrade was made quite two or three years ago, so it is getting harder and harder to find a printer that doesn't have them, but they certainly exist. In fact, I couldn't find such a printer around Adobe, so I'm not certain that my font checking code works properly, but it should be close. Glenn Reid Adobe Systems %! %%Creator: Timothy Hayes with a little help from Glenn Reid %%Title: sample program for ISO Latin-1 Encoding of fonts %%EndComments % define /ISOLatin1Encoding only if it's not already there. If it is % there, save the memory you otherwise would have wasted with the array: /ISOLatin1Encoding where { pop save true }{ false } ifelse /ISOLatin1Encoding [ %def /.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 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/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 % boolean still on stack from previous "ifelse" statement { restore } if % The "checkISO" procedure is called from "reencodeISO" below. It checks % to see if the font has the ISO-Latin-1 characters by looking for "Thorn". % You may want to omit this (and the call to it below). /checkISO { %def % expects a font dictionary dup /FontType known { %ifelse dup /FontType get 3 ne { %ifelse dup /CharStrings known { %ifelse dup /CharStrings get /Thorn known { %ifelse % everything is cool }{ %else % does not have ISO character set; error message here. dup /FontName known { dup /FontName get }{ /UnknownFont } ifelse % font name is on stack. print it across comm channel: 128 string cvs print (: does not support ISO character set.) = flush stop % abort entire print job. } ifelse }{ (checkISO: No CharStrings; something wrong.) == } ifelse }{ (checkISO: User-defined font; you're on your own.) == } ifelse } { (checkISO: No FontType; you're on your own.) == } ifelse } bind def % The following procedure will reencode a font by copying it and replacing % it with a vector of 256 names that you supply (hopefully the ISOLatin1 % vector, since it is tailored for ISOLain1; if you get rid of the % "checkISO" procedure call and name it just "reencode", it is more % generally useful). % % It expects to find three things on the operand stack: % % [ array ] /NewName /OldName reencodeISO /reencodeISO { %def findfont checkISO dup length dict begin { 1 index /FID ne {def}{pop pop} ifelse } forall exch /Encoding exch def currentdict end definefont pop } bind def ISOLatin1Encoding /Courier-Foreign /Courier reencodeISO % the rest of the program is as originally posted: /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
hayes@apollo.COM (Timothy Hayes) (03/23/89)
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 ===============
greid@adobe.com (Glenn Reid) (03/28/89)
In article <4232408a.1830f@apollo.COM> hayes@apollo.COM (Timothy Hayes) writes: > > 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. Since this is of general interest, I posted a reply on March 15. Perhaps it didn't make it to the outside world, but I got no error reports. Anyway, here it is again. Glenn Reid Adobe Systems [ original header moved right to avoid confusing any software ] Path: adobe!greid From: greid@adobe.com (Glenn Reid) Newsgroups: comp.lang.postscript Subject: Re: Re: Encoding vectors/character sets Message-ID: <655@adobe.UUCP> Date: 15 Mar 89 18:55:07 GMT References: <42053a69.1830f@apollo.COM> Sender: news@adobe.COM Reply-To: greid@adobe.COM (Glenn Reid) Organization: Adobe Systems Incorporated, Mountain View Lines: 162 In article <42053a69.1830f@apollo.COM> hayes@apollo.COM (Timothy Hayes) writes: >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. Enclosed is the original program, slightly rewritten. It supplies the ISOLatin1Encoding vector if it is not already in ROM, and checks to see if the font you are trying to reencode contains the appropriate characters. It is possible to have the vector but not have the character set (newer printer, old downloadable font) or to have the character set but not have the vector (old printer, newer downloadable font). This upgrade was made quite two or three years ago, so it is getting harder and harder to find a printer that doesn't have them, but they certainly exist. In fact, I couldn't find such a printer around Adobe, so I'm not certain that my font checking code works properly, but it should be close. Glenn Reid Adobe Systems %! %%Creator: Timothy Hayes with a little help from Glenn Reid %%Title: sample program for ISO Latin-1 Encoding of fonts %%EndComments % define /ISOLatin1Encoding only if it's not already there. If it is % there, save the memory you otherwise would have wasted with the array: /ISOLatin1Encoding where { pop save true }{ false } ifelse /ISOLatin1Encoding [ %def /.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 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/dotlessi/grave/acute/circumflex/tilde/macron/breve /dotaccent/dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut /ogonek/caron/space/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 % boolean still on stack from previous "ifelse" statement { restore } if % The "checkISO" procedure is called from "reencodeISO" below. It checks % to see if the font has the ISO-Latin-1 characters by looking for "Thorn". % You may want to omit this (and the call to it below). /checkISO { %def % expects a font dictionary dup /FontType known { %ifelse dup /FontType get 3 ne { %ifelse dup /CharStrings known { %ifelse dup /CharStrings get /Thorn known { %ifelse % everything is cool }{ %else % does not have ISO character set; error message here. dup /FontName known { dup /FontName get }{ /UnknownFont } ifelse % font name is on stack. print it across comm channel: 128 string cvs print (: does not support ISO character set.) = flush stop % abort entire print job. } ifelse }{ (checkISO: No CharStrings; something wrong.) == } ifelse }{ (checkISO: User-defined font; you're on your own.) == } ifelse } { (checkISO: No FontType; you're on your own.) == } ifelse } bind def % The following procedure will reencode a font by copying it and replacing % it with a vector of 256 names that you supply (hopefully the ISOLatin1 % vector, since it is tailored for ISOLain1; if you get rid of the % "checkISO" procedure call and name it just "reencode", it is more % generally useful). % % It expects to find three things on the operand stack: % % [ array ] /NewName /OldName reencodeISO /reencodeISO { %def findfont checkISO dup length dict begin { 1 index /FID ne {def}{pop pop} ifelse } forall exch /Encoding exch def currentdict end definefont pop } bind def ISOLatin1Encoding /Courier-Foreign /Courier reencodeISO % the rest of the program is as originally posted: /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