Contextual alternates (calt) ot programming

I just can’t seem to get calt features working in my font.

OT programming seems to be slightly different in Glyphs than it is in FontLab. I have a few questions about how to go about doing things.

  1. Is there a place where I can define classes? FontLab has both the “classes” pannel as well as the bottom half of the OT pannel where you can type in and group classes. This bottom text area seems to behave differently than FontLab and doesn’t retain info from from feature to feature.

  2. It appears that I don’t need to define a feature like this when using Glyphs, correct?:
    feature xxxx {
    } xxxx;

Anyway, here is what I am trying to do:

sub @NEEDH @NHIGH’ by @HIGH;
sub @NEEDL @NLONG’ by @LONG;

@NEEDH = [H O h m n o o.high o.long];
@NHIGH = [d e o p t];
@HIGH = [d.high e.high o.high p.high t.high];
@NEEDL = [p p.high s];
@NLONG [d l o r end];
@LONG = [d.long l.long o.long r.long end.long];

Help greatly appreciated, Huge fan of Glyphs! thanks!

I just implemented the classes. I need to do some more test, but will upload the version in the next days.

Yes, you don’t need to write the
feature xxxx {
} xxxx;

for now you can write:

sub [H O h m n o o.high o.long] [d e o p t]’ by [d.high e.high o.high p.high t.high];
sub [p p.high s] [d l o r end]’ by [d.long l.long o.long r.long end.long];


Thanks Georg,

The new classes work great. calt doesn’t work in the Glyphs preview but it works fine in InDesign.

Looks like previews of open type features are possible using the dropdown menu labelled “features” in the lower left hand corner of the window.

i am a bit confused: isn’t the class not already implemented in the left of the feat.panel?
i am quite used to name a class (e.g. »classname« in the tab and fill in all the members »a b c d e f …«
and link to that class in the feature with »@classname«

both versions seem to work (defining groups and typing them into the feature with […]

what is the bottom right field for? i did not really get that from the help oder the manual pdf

You are right. Classes can be defined inside the feature with [a b c] or with the classes in the sidebar.

The lower right text box is only for notes.

ah ok, great. i was shortly afraid, that my procedure works on an accident :slight_smile:

thank you

On other context but still related to "calt" feature;
Wondering if it is possible to include SPACE as a glyph in writing the feature code, ie.

Strangely; the feature works almost fine in Glyphs preview

But in Adobe Indesign & Illustrator the result overlaps the previous & next words !!


The following screenshot shows all hidden Characters (in blue) where you may notice the many spacing entered before and after the calt Feature in order to get the sought typesetting.
It is like Indesign eliminates Spaces when it reads the feature.

I have tried to resolve that with the .rlig Feature but it did not work !!
Please advise.

you are replacing the spaces glyph. try this:

sub space feh-ar.init' yeh-ar.fina' space by feh_yeh-ar.calt;

Now it works;
I missed the “Single left Quotation” Mark