[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DVIPS fix for better Macintosh PDF



Yesterday, on the PDFTeX and TeX-Fonts list, I outlined a bug in the
Macintosh Acrobat Reader (in combination with ATM Deluxe 4.0) where
it doesn't like encodings that refer to glyphs not in the font. This
problem can be prevented by changing:

   /ReEncodeFont{/Encoding exch def}def

... in texps.pro, to:

   /ReEncodeFont{
      /Encoding exch 256 array copy def
      CharStrings rcheck {
	0 1 255 { dup Encoding exch get CharStrings exch known
		      { pop }
		      { Encoding exch /.notdef put }
		  ifelse } for
      } if
    }def

This approach does require 256 bytes extra per font (it copies the
encoding rather than referencing it directly, and then deletes every
entry for which there is no glyph in the CharStrings dictionary).

While I have tested this reencode procedure in hand-written PostScript,
I have not actually tested it in DVIPS. I'm distributing it early to
save other people sitting down and coming up with the same thing.

    Melissa.