[tex-k] dvips: UniqueID not removed from all subsetted Type1 fonts
czietz at gmx.net
Sat Aug 31 11:29:10 CEST 2013
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  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,  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.
 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."
Christian Zietz - CHZ-Soft - czietz at gmx.net
More information about the tex-k