Pomax / cff-opcode-fonts

OTF fonts for testing CFF opcode support
7 stars 1 forks source link

Random font can't be visually inspected #5

Open iphonedollaraire opened 2 years ago

iphonedollaraire commented 2 years ago

The CFF random operator is defined to return a real number between (0..1] -- this should multiply 700 rather than be treated as a coordinate itself to allow a more visual inspection of the result:

0 0 rmoveto 0 700 random mul rlineto 700 random mul 0 rlineto 0 -700 random mul rlineto -700 random mul 0 rlineto

Note also that the PRNG seed can be defined in the font itself as 'initialRandomSeed' in the font's Private DICT.

(Nearly moot because many implementations still ignore the CFF random operator and at least some Adobe apps rewrite the font to include their own random value as a number(!) -- maybe related to CFF2?)