Hello, I am fairly new to the glyphs app and hopefully I can get an answer here.
In my typeface I have two different Ž letter designs. Is it possible for the alternative design to be used only when the word is using letters like ČŠĖŪ, and the rest of the times it can use the primary design.
Do you mean you want the alternate Zcaron only to be used if the word in which it is written used other accented uppercase letters? This kind of condition is not possible with OpenType feature code.
You can only substitute based on immediate context, so you could substitute for a Zcaron if it is directly next to a specific letter (or group of letters). OpenType feature code cannot take variable condition scopes (such as words) into account.
You can, however, switch to different glyphs depending of the language. So if a document is set in English, for example, use one set of glyphs, and when the document is in French, use alternative glyphs.
Sadly, the software support for marking documents (or even individual words) with specific languages is limited. It works well in some systems, like websites, and less well in to not at all in other systems, like word processors.
Yes, this is what I meant. I knew it was possible if specific letters were directly next to it, but thought maybe it was possible to take it a step further. Thank you for you help.
You can make a class with all letters, class with those exceptions and that way check if the exceptions appear a few chars away from it. Repeat something like this 10 times in both directions, or whatever your expected max word length is:
sub Zcaron' @CSEU by Zcaron.alt;
sub Zcaron' @All @CSEU by Zcaron.alt;
sub Zcaron' @All @All @CSEU by Zcaron.alt;