Writing feature code for initial forms

Hi guys been a while since I last posted. Been working on this font for close to a year now and have a few questions about writing code for inital forms. If anyone remembers the said glyphs–NUNIREDO.glyphs (36.7 KB) my fonts vowels change based upon what letter either precedes or follows them.

I had to restart from scratch (with my glyphs knowledge much better) because my coding was all over the place and when I would fix one thing it would mess up another. I have a full list of each and every combination of vowels/ letters now so I know what needs to be done. That being said when I loaded in the mostly done prototype as a webfont into my website the kerning on the margins was getting cut off when loaded online. To fix this I made an inital forms class/ feature.

My question is how do I write the feature code for an intial form correctly? Let me elaborate;

I need the beginning letter of a word to be the glyph .init (ex: M.init)

I tried following the tutorials online by generating:

ignore sub @AllLetters @Medial’;

sub @Medialby @Initial;
But this is not working! Any help would be greatly appreciated and sorry if this is a dumb easy fix!

Attached is the new trial of my set of glyphs.

You do mean this one, right?
https://glyphsapp.com/tutorials/features-part-4-positional-alternates

How are you testing? And how is it not working?

Yes that one. I dont understand how to write the code correctly so the first letter in word will be the correct init glyph instead of the medial (normal) form. When I activate “liga” features everything is exactly as I coded it. When I activate “init” features nothing happens. And when I activate “calt” features the inital forms are spotty and appear in the middle of words? I included a glyphs file in my previous post, do you mind taking a look at it?

Do not activate init feature, it is for Arabic and similar writing systems only. Only calt. I added a note to the tutorial to make that clearer.

  1. aalt should come first. Move calt to the bottom of the features.
  2. Disable init, or delete it.
  3. Compile.

Works as described in the tutorial. The first letters get substituted for an .init shape.

Been working on it. Please take a look at at my updated font. Im still confused and my code may be written wrong. I have the glyphs appearing correctly at the beginning of the word but when they follow a vowel they revert back to initial form. NUNIREDO.glyphs (148.4 KB)

1 Like

I may miss the idea but why don’t you use the existing Rainer’s script for building positional calt feature?
https://github.com/mekkablue/Glyphs-Scripts/blob/master/Features/Build%20positional%20calt%20feature.py