: How does random choice of alternate characters work in OpenType fonts? I have a question similar to “Writing text with character variations”: I would like to create a casual hand-written-style
I have a question similar to “Writing text with character variations”: I would like to create a casual hand-written-style font, that reproduces the natural variety between occurrences of the same glyph that one find in handwritten text. Contextual alternatives are good, but from what I understand they are mostly appropriate for letters linking together than for a script where all letters are separated by whitespace.
One of the answers to the above-linked question says (emphasis is mine):
While you'd normally have only a few letters with a contextual alternate, it's theoretically possible to have several forms per letter. But I don't believe you can really randomise their appearance, only cycle through them (so, if you had three forms of 'a', they'd be used in sequence and start repeating in 'the black cat sat on the mat')
Well, it doesn’t seem to be true, because I found some mentions of an OpenType feature called randomize, which can apparently do that. For example, on this TeX package webpage:
Knuth’s original fonts generated different shapes at random. This isn't actually possible in an OpenType font; rather, the font contains several variants of each glyph, and uses the OpenType randomize function to select a variant for each invocation.
So: is there a mechanism for random selection of glyph variants in OpenType, and how does it work? A link to adequate online documentation or quote from the spec would be invaluable. Also: do you think this goal makes sense, i.e. it would improve the quality of the typeset text much to include multiple randomly-select glyph variants?
More posts by @Turnbaugh909
2 Comments
Sorted by latest first Latest Oldest Best
I believe what you're describing is the contextual alternates feature of opentype. ( msdn.microsoft.com/en-us/library/ms745109.aspx )
Nick Shinn has a really interesting article on many of the features available using contextual alternates, and how he used it in five fonts he designed. Duffy Script in particular was used in the way you're describing. ( ilovetypography.com/2011/04/01/engaging-contextuality/ )
Looking more deeply, I was able to find this post describing how to rotate through your glyphs on subsequent uses (which will generally appear random): forums.adobe.com/message/1785905#1785905
That dives right into the middle. I can look further if you would like something that has a bit more information to get you started or if I misunderstood your initial request.
I haven't played with the randomize function but I have gotten some good results with extensive use of ligatures.
Most the variation in handwriting is related to context: this follows that, that follows this, this is the end of the word, etc. OpenType ligatures can accomodate for a lot of variation if you're willing to plan it out well.
There is also the legendary Beowolf font by LettError. That kind of programming is not for the average type developer.
** UPDATE **
Still no answer? I thought some smart programmer would have solved this for you by now. Well, let me add a little more info to the pool.
The only true randomization experiments I'm aware of (like Beowolf mentioned above) have been done with PostScript. If you are willing to step away from OpenType, Luc Devroye did a paper (PDF) that delves into the programming of a PostScript Type 3 solution in this problem. He also has a list of things related to the issue of randomized fonts for reference.
As with all things type, there was a discussion on this topic on Typophile some time back. In that thread 8 years ago, Thomas Phinney made this statement that I believe still holds true (the OpenType spec hasn't changed much that I'm aware of):
Sure. Assuming you want it to work in some existing applications, you
have an unexciting choice insofar as each approach is very limited in
how/where it works:
OpenType (contextual, WYSIWYG, currently only supported by Adobe's apps, any output device, easiest to code but that's not saying a lot,
use FontLab or maybe DTL FontMaster to make it)
AAT (contextual, WYSIWYG, Mac only, currently only supported by a handful of apps, any output device, hard to code contextual stuff, use
Apple's command-line tools to compile the features into a pre-existing
font)
Type 1 (true random, non-WYSIWYG, will work in many apps but not most recent Adobe apps, will only work with PostScript output devices,
you'd probably have to be a programmer to code it)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.