[NTG-pdftex] gs problem

Hans Hagen pragma at wxs.nl
Mon Oct 25 09:55:37 CEST 2004

Reinhard Kotucha wrote:

> Hi, did you try the font with other programs?  It seems to be most
> probably a bug in ghostscript.

> A copyright notice in a Type 1 font is just a string.  I didn't find
> anything about limitations in the Type 1 Reference Manual or TN 5015.

hm, i found out that when for instance afm files have lines longer than 
256, some programs break on it so either we have to do with fuzzy specs, 
or rumoured lengths, or lousy programming

> The PostScript Language Reference Manual (Appendix B) describes PS
> interpreter requirements.  According to this, any PS interpreter
> should be able to handle strings of least 65535 bytes.

Interesting, i wonder why gs has limitations then; what does the spec 
say about unknown %%comments? GS breaks on them each time adobe adds a 
new undocumented one.

> So I think that ghostscript is the culprit and the bug should be fixed
> there.  Can you send me a small file which shows this problem?  At the
> moment I have 30 different versions of gs installed on my system and
> it shouldn't bee too difficult to find out which versions are affected
> (or when this bug had been introduced).

i filled in a bug report for gs; i also downloaded the 8.31 beta version 
which seems to work ok; this means that the official version has problems

> /Copyright (copyright by me.) def
> /Copyright (you are not allowed to) def
> /Copyright (give this font away!) def
> The content of /Copyright is now the string "give this font away!".

i hadn't thought of that one -)

> Even worse, /Copyright is defined as "readonly def".  A PS interpreter
> should complain if someone tries to overwrite the initial definition.

we could zip it:

if length> 255 then /Copyright(zipped: ,zipped string>} -)


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl

More information about the ntg-pdftex mailing list