Swash followed by initial form

Hi and Happy New Year!
I am recently working on a connected latin script font using positional forms for UC and LC letters.
.fina is being used by glyph variants with no connector on the right side; .init glyphs have no incoming connectors to the left (which affects only a few glyphs like t, z and f); .isol glyphs are either UC followed by UC to avoid overlapping caps or LC for single letter words or abbrevations.
Now to my question:
The font also has swash glyphs which should be followed by initial glyphs, so the word “Atoll” should look as follows:
A.swsh t.init o l l.
But with the substitution code I wrote in .calt feature all four glyphs after A.swsh turn to .init, no matter if I use a lookup code or the “ignore sub” syntax. What am I doing wrong?

Can you post your code? Hint: paste the code between triple backticks (`).

ignore sub @Uppercase @MedialUC';
sub @MedialUC by @IsolatedUC;
sub @InitialUC by @IsolatedUC;

ignore sub @Swash @Medial';
sub @Medial' by @Initial;

Lines 1–3 are for Upper Case typesetting which seems to work properly.
Lines 4–5 are those that do not work.
When the apostrophe in line 5 is added, letter 2 is medial, not initial; without that apostrophe all following letters are printed as initials.
What do you mean by triple backticks? The calt window reports an invalid charakter when I put them to the code.

Lines 2-3 are lacking the context that line 1 establishes, so the ignore in line 1 has no effect. You probably mean:

ignore sub @Uppercase @MedialUC';
sub @MedialUC' by @IsolatedUC;

This would turn all medial uppercase glyphs into isolated uppercase glyphs, unless they are preceded by an uppercase glyph, assuming that this is what is in the classes. However, to be honest, I do not understand what you want to achieve with this.

How about this:

# change initial uppercase letters into swashes:
	ignore sub @AllLetters @UCnoSwash';
	sub @UCnoSwash' by @UCSwash;

# change all medials to initials
# at the beginning and after swashes
lookup INITIAL {
	ignore sub @AllLettersExceptUCSwash @Medial';
	sub @Medial' by @Initial;

Regarding lines 1–3:
Most medial UC letters have a connector that joins with following LC letters. In case of words entirely set in UC there would be overlaps between some glyph combinations. That’s why words in UC should use the isolated form.
When I change the code as you suggest all letters except the first ones connect. But it works as expected in my version (at least in Glyphsapp edit window).

Regarding the other code:
I will try your version soon, but first I have to rearrange my classes.
Thanks a lot for your advice, I will send you my feedback!

Hi Rainer, thank you again.
The INITIAL lookup is working fine!
I also found a way for upper case words in isolated form:
lookup CAPS {
ignore sub @Lowercase @MedialUC’;
sub @MedialUC’ by @IsolatedUC;

The INITIALSWASH lookup did not work because I struggled with the class AllLettersExceptUCSwash. Maybe I will find another solution.

You can use a predicate token:

$[category like "Letter" and not name like "*.swsh*"]


Thank you again. Somehow it works fine now with your suggested class “AllLettersExceptUCSwash”.
I also succeeded in setting initial LC letters after UC letters without outgoing connectors AND replacing initial LC by isolated LC in two-letter words. :star_struck:
This is what I have done (I know that my hashtagged explanations and lookup names could still be improved, but anyway):

# change LC medial letters following UC without outgoing connectors to LC initial 
	ignore sub @AllLettersExceptNoConnectingUC @Medial';
	sub @Medial' by @Initial;

# change LC fina letters following UC without outgoing connectors to LC initial 
	ignore sub @AllLettersExceptNoConnectingUC @Final';
	sub @Final' by @Isolated;

Thank you!