Typophile

How to substitute two letters for alternates rather than a ligature

Martin Silvertant

I continued working on this handwritten typeface and while I made alternates to replace double vowels before, I would prefer to replace both vowels individually.

So, right now I have the following feature:
sub a a by a_a;

/a_a features two variants on /a that are both different from the default /a. Essentially what I want to do is replace /a /a by /a.alt1 and /a.alt2 instead of /a_a, because I want to maintain the ability to apply tracking to all the letters.

Now, I actually have this feature working with the following code:
sub a' a by a.alt1;
sub a.alt1 a' by a.alt2;

However, this doesn't seem to be the most beautiful solution and I'm not sure if there are instances where this feature won't work appropriately. Is there a better solution than this? Can it be done with only one line?

Can it be done with only one line?

No. Feature code has some real limitations. I did a connecting script this year and discovered just how much feature code won't do in certain situations. To me that's a real shortcoming since connecting scripts with alternates have been around for well over a hundred years.

I suppose this has no bearing on what you're talking about, but just to clarify, the typeface I'm currently working on is not a connected script. It's more akin to Comic Sans.

So is the feature code I'm working with now (the second example) proper?

Yeah, that's how it's done. You should probably add "sub a.alt2 a' by a.alt1;" so that if there are, say, seven a's in a row, the last is not noticeably the odd one out.

Good idea. Thanks!

Captured from web.archive.org on 18 Mar 2015. view this capture