Script font Features help

(New Glyphs-user here). :grinning:

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.

Best regards,
Anton

Adding f.AltMedi to the HighConn class (putting the glyph in both the AltMedi and the HighConn class) should fix the issue.

I tried that out, but it causes the same chain-reaction. It turns every medial after a AltMedi, to Altmedi.

I need let’s say, o(HighConn) p(alt.medi) b(medial).
Or if it changes: o(HighConn) p(alt.medi) o(Highconn) o(Alt.medi) b(medial).

I guess it’s easier to check if you have the .glyphs file. It’s kind of hard to explain. :grinning:

IP_Cursive_Forum.glyphs (125.4 KB)

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.

Aaaaah. It looks like it’s working! :smiley:
Thank you so much Florian. <3

Now, I’m going to spend some time figuring out why this works.

I’m new to all of this feature-business, so thank you. :slight_smile:

Let’s say you have the following glyph sequence:

f f l

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.)

1 Like