How to replace a glyph at the end of a line or paragraph

How to replace a glyph at the end of a line or paragraph not end of a sentence… it’s not like final alternate rather it may be an alternate of final form… I’ve watched the positional alternate 4 topic but there are init, fina, iso alternate…please help me…how to make this type of alternate by opentype?? what is that character the make a new line?

Sub your source glyph by your target glyph except when another glyph comes before or after. That should target beginning and ending of lines. You would use ignore statements and classes that include all glyphs that should prevent a substitution.

Can not do it…can you give me a sample font with such features??..or please mention some font’s name which have similar features…I want alter the last glyph at the end of each lines of paragraph.

You can’t really target the end of a line. Only the end of context. So if you change the font in the middle of the line, you will get you “final” substitution.

And this tutorial might help: https://glyphsapp.com/tutorials/features-part-2-contextual-substitutions

The method I described above works, at least in Adobe apps. In Text Edit, it requires hard returns to work. Not sure about other apps.
The following screenshot shows a stylistic set that applies swash letters at the beginning/ending of lines (this one is from Illustrator).

@Shreya there is really not much more to it than what I described: you need classes for your source letters, target letters, and all letters. Then you can do something like this:

lookup swsh_line_end {
  ignore sub @swsh_from' @all_letters;
  ignore sub @swsh_from' space @all;
  sub @swsh_from' by @swsh_to;
} swsh_line_end;

Succeeded & I can’t express how much happy I am today… seriously tears is rolling down from my eyes by the happiness which is only possible by your help @joachimvu & @GeorgSeifert…Thank you so much​:heart::heart:…God bless you forever… :pray: