I'm working on a font, creating a glyph based system, based on IPA input, using Consonant-Vowel pairs, as well as Vowel-Consonant pairs.
Each "sound" is mapped to a glyph, and each pair is overlaid on top of the other. If a consonant precedes a vowel, the vowel glyph is overlaid on top of the consonant. Vice versa, if the vowel precedes the consonant, then the consonant glyph is overlaid on top of a vowel glyph, but the vowel changes to an alternate form with a diacritic attached to the bottom.
My kerning is set to reflect that, overlay the preceding glyph ontop of the former, and any consonant-consonant and vowel-vowel pairs are left alone.
I have a rule set up that if a vowel is followed by a consonant to change it to the alternate glyph, and that works okay. Consonant-vowel pairs work right too. Everything is good until a word hits a vowel-consonant-vowel sequence, in which it should combine the alternate vowel with a consonant, but the problem is that it sees the consonant and second vowel as a valid pair, combines them, and overlays all three on top of each other, breaking the rest of the word from that point onwards.
Is there any way to get the lookup to only look for a pair, combine them, then start anew? Most everything is working correctly aside from that hiccup. I'm not versed in scripting directly, and I'm unsure of what to do. I have the contextual rules following one another in a set, but even if I separate them, it still acts the same, so I don't think that matters. If anyone can help, it'd be much appreciated.
As a secondary question, and not entirely necessary to answer, but I have the vowels set to each have their contextual alternate forms as separate glyphs, but is it possible to replace all of these with just a actual diacritic mark that gets placed beneath when the vowel-consonant pair is detected?