How to set up "rand" feature

pablohoney77's picture

Okay I'll try this again...
I know there are no current applications that support this feature, but it seems that there is a moderate amount of interest in random fonts at least from what i read here on these boards.
Anyhow, I've wondered about the "rand" feature. Would it be set up like:
sub x from [x x.salt1 x.salt2 x.salt3 (etc.)]
and then the application would randomly pick from within that set? or is there a more ideal way that this would be set up?
unfortunately, i doubt any apps will support this feature anytime soon, but it'd be nice to know how this feature would be written in theory.

John Hudson's picture

Yes, you would use GSUB lookup type 3 (one-to-one-of-many) so you would map from the default glyph to an enumerated set of possible alternates. See the <rand> feature description in the OT spec for more details.

pablohoney77's picture

thank you yet again, John, i'm assuming i can find a description of what the different lookups are/mean somewhere on the Microsoft site too? (sorry, i just like asking self-explanitory questions i guess. thnx for being patient with me)

Syndicate content Syndicate content