Bhikkhu Pesala wrote:So why not use a menu to select from two or more Stylistic sets. Only one glyph needs to mapped, the others can use glyph substitutions...
It's the mechanism for drawing the substituted glyph I'm not sure of. You indicated that you replace strings something like uu with a substitute u-like glyph: is this the way it is done in general? Ie choosing a sequence of characters which will not appear naturally, and then using the OTF feature to replace that string when it occurs with a substitute glyph? [I can see the repeated symbol might be useful, as deleting either one in an editor window will leave you with the original symbol.]
I was already mulling over a related question: ligatures like oe. Sometimes you might want to replace oe by the ligature (eg Oedipus) but in other cases it would be wrong - eg coefficient. So you can't leave a general rule (even a contextual
one as far as I can see) to replace oe by a ligature. Unless, I guess, you list all words where the ligature is to be used! I assume this is why the ligature has its own code point, and you can enter it explicitly where it is wanted, and leave it out of the substitution table in the font? [Come to think of it, I think ae exists as a separate letter on Danish keyboards!]
So you'd only need unlikely strings like uu to signal an optional substitution, when the substitute glyph does not have its own code point?
Sorry if I'm being slow - it's all very new to me!
Meanwhile it appears that the basic Windows UTF-16 APIs I'm using in my program TextOutW() ExtTextOutW() DrawTextW() do handle substitutions
but do not handle kerning!
Like FontCreator's test window (which probably uses one or more of them). This feels weird, as surely kerning is a rather older font technology than Open Type ligatures and substitutions
I suppose one could effectively do kerning by defining an AV glyph (not necessarily with a code point) and using it as an A V -> AV ligature. Is that an intended procedure with Open Type technology, or am I dreaming up ways to abuse the system?