🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.postscript.programming
Article #423

Re: Is this legal?: /(NameOfSomething)

#423
From: SaGS
Date: Thu, 07 Dec 2006 08:00
33 lines
2414 bytes
<Stephen_Moye@adobeforums.com> wrote in message 
news:3bc27cf3.-1@webcrossing.la2eafNXanI...
> An author has sent us some graphics made with a program called "inkscape". 
> The eps file has this coding:
>
> /newlatin1font {findfont dup length dict copy dup
>    /Encoding ISOLatin1Encoding put definefont} def
>
> /(Times-Roman-ISOLatin1) /(Times-Roman) newlatin1font
> ...
> %%[ Error: Times-Roman-ISOLatin1 not found. Font cannot be embedded. ]%%
> ...

It is legal PostScript, but certainly with a different semantic
than what the code intends.

The "/(Times- ..." line in the code fragment above does the following:

- Push a litteral empty name on the operand stack; "/" by itself
  is legal.
- Push the string "(Times-Roman-ISOLatin1)"; note that "()" are
  delimiters, so there's no need for whitespace between "(" and the
  preceding token.
- Push a second empty litteral name.
- Push the string "(Times-Roman)".
- Execute "newlatin1font". This looks or a font named "Times-Roman",
  reencodes it, then defines a font with an empty name. Note that
  in some circumstances names and strings are interchangable, so
  "(Times-Roman)" can be used instead of "/Times-Roman".
- The 1st "/" and "(Times-Roman-ISOLatin1)" are forgotten on the stack.

A consequence of the above it that no font gets defined with the name
"Times-Roman-ISOLatin1", which later leads to the error you mention.
Technical Details
Message-ID: <A20EDC14F6ABB643F630E0F1662FB635@in.webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.germany.com!news.motzarella.org!news.isoc.lu!webcrossing
References: <3bc27cf3.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,739205f7608ef9a7
X-Google-Attributes: gid10c61a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: SaGS@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.germany.com!news.motzarella.org!news.isoc.lu!webcrossing
Newsgroups: adobe.postscript.programming
Subject: Re: Is this legal?: /(NameOfSomething)
Message-ID: <A20EDC14F6ABB643F630E0F1662FB635@in.webcrossing.la2eafNXanI>
Date: Thu, 7 Dec 2006 00:00:54 -0800
References: <3bc27cf3.-1@webcrossing.la2eafNXanI>
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit