> I'm trying to create UniqueID's for dynamic postscript fonts. According > to my resources we don't actually need to use these, but if they are > required by a particular postscript program (perhaps to make a print run > efficient) then the private range of these ID's is 4000000<=UID<=4999999 > ie a range of one million. > > So I probably really need an 18 bit hash
I don't fully understand the example, but ISTM that "no, you don't need a hash at all. You need a unique identification". > The data going into the font consists of > > fontBBox '[-415 -431 2014 2033]' > charmaps ['dup (\000) 0 get /C0 put',......] > metrics ['/C0 1251 def',.....] > bboxes ['/C29 [0 0 512 0] def',.......] > chardefs ['/C0 {newpath 224 418 m 234 336 ......def}',......] > > 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? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list