Hi all, I am working on a font that has some swashes and I since I’ve never work with that feature I don’t know where to start, so I have some questions: how do swashes work? the font should contain an alternate for each letter as initial and end? , ie. a.inita.fini? or we just have to have swashes forms alone and just try to overlap them depending on the letter?
I just have some swashes design that I need to apply as OT feature, just got the swashes shapes (without the letter itself) so I am not sure how to proceed. Seems like I can just make another stylistic set, but I want to ensure that users can uses the proper swash feature within the software
If you want to attach a final swash to lowercase a, then make the alternate of a with the swash physically attached, and don’t forget the ones with diacritics. Ideally you do all possible combinations. You’ll find those glyphs in Adobe italic fonts for example (e.g. Adobe Garamond Italic, Jenson Italic…).
And in swsh feature, you just use normal substitution just like in other GSUB features. Your code should look like this for example:
sub [a aacute] by [a.swsh aacute.swsh];
If you want swashes to happen contextually, it’s a bit tricky; essentially you need to adapt the code in that tutorial, but also ideally in cswh feature(Contextual Swash). And it’s perfectly fine to stop reading here.
In my understanding, swsh feature should activate all swash alternates. If there are things that need to be cancelled contextually, that should be handled in cswh feature. In Adobe apps, if you have contextual alternates (on by default) and swash active, then calt, swsh, and also cswh are activated. What I’d do is to activate all swash features in swsh (let’s say final swash), and in cswh write a code to suppress medial ones back to default, and activate initial swash letters.
Frankly you can code it however you want and yours can make sense.
In my typeface which has all three positional swashes, I prioritised initial swashes in swsh feature, and wrote everything that involves context in cswh (swash cancelling, calling different swashes, etc. depending on the position or neighbouring letters).