I have a Glyphs-question for you—I’ve been struggling with this for a couple of days now and can’t figure out how to solve it. I’ve created a Script-font.
b f o odieresis t v w : These are the letters I want to create a feature for. They are in a class called HighConnbecause they have a high connection in the end of the glyph that connects “high” with the following medial letter. I have created a set of new medial letters that belong to a class called AltMedi, which are designed to follow a HighConn letter.
I managed to write a feature that looks like this:
lookup Adjust03 {
sub @ HighConn @ Medial’ by @ AltMedi;
} Adjust03;
This successfully replaces a regular medial letter with an AltMedi when following a HighConn letter. However, the problem arises when there are two HighConn letters in a row. For example, when writing “Tafflig,” an issue occurs after the second “f,” which is an AltMedi. The “l” then becomes a regular medial “l,” which does not fit.
I also tried another feature on top of that:
lookup Adjust04 {
sub @ AltMedi @ Medial’ by @ AltMedi;
} Adjust04;
But as you can imagine, this caused a chain reaction, turning everything into AltMedi.
Do you have any thoughts on how to solve this? Or should I build the font in a different way?
I’ll post a screenprint of all my features and of the examples of the error.
IMG 01: Visualisation of the problem.
IMG 02: When I type: ffffffffff.
IMG 03: Current calt.
You have added all AltMedi glyphs to HighConn, but you only need to add those that have a “high connection” and thus also belong to HighConn like f.AltMedi (or f.001 in the file you provided).
Change the HighConn class to the following list:
b f o odieresis t v w b.init f.init o.init # ...
b.001 f.001 # ...
So, add f.001, b.001, and any other glyphs from AltMedi that also belong to HighConn.
Using the rule sub @HighConn @Medi' by @MediAlt, the glyph sequence gets turned to:
f f.001 l
If f.001 is not in @HighConn, then that pattern f.001 l does not match and the l is not changed. However, if f.001 is in @HighConn, then f.001 l also matches the rule and you get
f f.001 l.001
(You should generally use more descriptive glyph names.)