Feature for using contextual alternates at beginning of line


I would like to use a swashed uppercase letter only when the letter occurs at the beginning of the line. I created a feature that uses the swashed letters when they occur at the beginning of words, by adding the .init suffix to the swashed letters and letting Glyphs automatically create the init feature. However, I do not want the swashed letters to occur in the middle of the lines. Is there a way to do this at the beginning of lines only? If I knew what the code for a line break or carriage return was, I might be able to do this.


Read this: https://www.glyphsapp.com/tutorials/features-part-4-positional-alternates

That is about positional alternates at the beginning of words. I would like to create a feature that uses contextual alternates only at the beginning of lines. Thanks.

The beginning of a new line is not in the character stream. The only thing you can try is excluding any preceding glyph with an ignore statement. Different apps handle this differently though. In TextEdit, new lines are ignored in the character stream, while InDesign splits the character stream into lines, which is why features are only applied on a per-line basis in that app.

But that is not how the swsh feature is supposed to be used in the first place. It is recommended to leave it to the user to select letters that are supposed to be turned into swashes: https://www.microsoft.com/typography/otspec/features_pt.htm#swsh

Maybe the cwsh feature is more like what you want, but again, you will only sensibly get it to work on a per-word basis, if at all. App support is negligible for cswh.

Thanks. I’ll turn this into a swsh feature, then, and will give up on the new line option.