robin at reportlab.com
Thu Jun 28 20:07:22 CEST 2007
Martin v. Löwis wrote:
>> ie a bunch of lists of strings which are eventually joined together and
>> written out with a template to make the postscript definition.
> And the UniqueID should be unique within this file, right?
> Why don't you just use a serial number then?
I do need a unique identifier for each font, unfortunately they are required to
be unique across more than one file. Effectively these fonts are dynamically
generated using the used glyphs rather than just dumping the whole of a ttf into
If the UniqueID is used it must be unique when used in the printer (where I
cannot control which other UniqueID's might be present).
If I knew enough about postscript I might generate a UniqueID at the point of
use (by inspecting some global state) unfortunately my postscript is poor so I'm
attempting to give the fonts an id that is likely to be unique by obtaining an
integer dependant on the font data and then shifting into the private range.
Luckily the cheap option of not using the UniqueID at all is available, but
chances are some printer ps interpreter will barf if it's not present and then I
need a fairly robust way to generate reasonable candidates.
More information about the Python-list