Apologies if already answered but I cannot see how to do this. Pointers welcome.
In one of my fonts it uses < f shaped s> . This should become< snake s > at the end of a word or in combination as a double s. That is if followed by space, period,s etc
I am failing to see how to express => and => etcetc.
Ordinary ligatures work fine where the target is a single glyph.
In the OpenType Designer, click on the first button on the toolbar to Generate and Update OpenType Features. Add Historical Ligatures and Historical Forms. (Click the All checkbox to clear all unwanted features).
Since OpenType layout features are processed in separate glyph runs, e.g. divided per script, it is not always guaranteed a space character is part of a glyph run as it is a common character, just like punctuation marks.
It is therefor good practice to use a contextual substitution that starts with an exception that represents the default. This way it will also work at the end of a line.
Here is fea syntax that substitutes the fshapeds if it is not followed by another letter.
languagesystem latn dflt; # Latin default
@letters = [A-Z a-z fshapeds];
lookup SingleSubstitution1 { # GSUB lookup type SingleSubstitution
sub fshapeds by snakes;
} SingleSubstitution1;
feature calt { # Contextual Alternates
ignore sub @letters' @letters;
sub @letters' lookup SingleSubstitution1;
} calt;
Hi
while I now understand the aim of this code, I have failed to get it to compile.
I had to make a couple of changes …
I added the calt feature to the script features
I changed ‘by’ to ‘->’ to match existing code that worked.
I removed trailing names after the ‘}’ on the subroutines as the compiler objected to them.
I recognise that my version will not cope completely with ‘ss’ - but I’m starting with the basics.
as in the attached images…
case 1.
the layout editor does not expect the ‘ignore’ in the feature
case2.
I tried moving the exception into the lookup - as per the open cookbook Style Guide
and that failed as it was not expecting ‘sub’ after ignore.
I used to test software and know that it could be just a silly error - or a parser case missing.
I can’t send the file as modified as it is not allowed to save it — but any advice would be welcome.
It seems you use an outdated version of FontCreator. It is strongly recommended to use the latest version, as that solves many issues, comes with numerous improvements, and has fea support, while your version seems to use the outdated OTLFD syntax.
Many thanks Erwin. As a retired person who does the occasional specific job for charities, I can’t justify the cost of an upgrade - especially as simple additional glyphs work fine in my current version. Thanks for your help and for taking the trouble to reply.