On Fri 06 Oct 2017 13:43:13 Tadziu Hoffmann wrote: > In Postscript you can use the same font with multiple different > encodings; I assume something similar is also possible in PDF. > The way this is done is by making a copy of the font dictionary, > keeping all entries except Encoding, which is replaced by the > required new encoding, and registering this copy under a new name. > (This does not really waste memory, since complex data types are > treated internally as pointers, so both copies of the font > share all data except for the encoding and the name.) > > Would this also be an option for gropdf?
Yes, I did consider this (having taken a peek at the ps output). The overhead of the extra font definitions is minimal, the tricky bit is ensuring I am using the correct font all the time. Currently I switch fonts whenever groff tells me to, but I would now need to add code to switch to select the correct subset as well. The advantage of your method is that it will always work, my method, of redefining unused characters, would still fail if the total number of glyphs used in one document exceeds 255. Although this may be unlikely, it is still a firm push that I should bite the bullet and go with your suggestion. Cheers Deri