[tex-k] dvips: UniqueID not removed from all subsetted Type1 fonts

Christian Zietz czietz at gmx.net
Sat Aug 31 11:29:10 CEST 2013


Hello,

I was pointed to this list to report a possible bug in dvips. Should
this no be the correct place for such a report, please advise me where I
can send it instead.

When modifying a Postscript Type 1 font, e.g. by subsetting, it is
advisable to remove its Unique ID [1] so that a Postscript interpreter
won't confuse the subsetted font with the original one. dvips contains
code to suppress the UniqueID. However, depending on the layout of the
PFB (font) file, this code is not executed.

When looking at writet1.c, function t1_subset_ascii_part, [2] the
relevant parts are:

- Copy lines from the original font, until "/Encoding" is found.
- Replace encoding if needed.
- Copy lines from the original font, skipping the "/UniqueID".

>From that, you can see that the UniqueID is only removed if it is
encountered after the Encoding in the font file. Otherwise it will be
copied into the subsetted font by mistake. There is no reason why the
treatment of the UniqueID should be different depending on if it appears
before or after the definition of the encoding.

Regards
Christian

[1] From the PostScript Language Reference, third edition: "When you
copy a font dictionary for the purpose of creating a modified font, you
should not copy the UniqueID or XUID entry."
[2]
<https://www.tug.org/svn/texlive/trunk/Build/source/texk/dvipsk/writet1.c?revision=28863&view=markup>,
lines 1164--1204.
-- 
Christian Zietz  -  CHZ-Soft  -  czietz at gmx.net
WWW: http://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x6DA025CA


More information about the tex-k mailing list