Help with Script .salt Features.

Hello, first post in this forum my name is Roger and in my spare time I digitize some typefaces,
mainly vintage combination ornament typefaces.

This is a my 2nd digitized revival of a font, which I am working on in Fontcreator 7.5 Pro;
I have designed 5 stylistic alternates;

and named them .salt and they are unmapped.

Wrote this script

script DFLT {
  # Default
  feature StylisticAlternates2;
}
feature StylisticAlternates2 salt {
  # Stylistic Alternates
  lookup Lookup3;
}
lookup Lookup3 {
  # Referenced by feature "StylisticAlternates2"
sub h -> h.salt;
sub m -> m.salt;
sub n -> n.salt;
sub s -> s.salt;
sub x -> x.salt;
sub y -> y.salt;
sub S -> S.salt;
}

Screenshot of the complete script;

When I try to use the alternates in designs, they do show in the Stylistic Alternates menu,
but when I insert them in the design the normal/regular version is loaded.

Any input, maybe there is something wrong with the script?

Thanks in advanced. Roger

I am not sure what that doesn’t work. What is the application in which you’re using them?

The way that I define stylistic sets in my fonts is with with one → many lookups. Try this instead:

lookup Lookup3 {
 # Referenced by feature "StylisticAlternates2"
sub h -> [h h.salt];
sub m -> [m m.salt];
sub n -> [n n.salt];
sub s -> [s s.salt];
sub x -> [x x.salt];
sub y -> [y y.salt];
sub S -> [S S.salt];
}

It’s CD X7 I believe. Maybe X6…

Bhikkhu beat me to it, I see.

I more or less remember–maybe misremembering the application–that CD doesn’t like DFLT, doesn’t work correctly, or something. But like I said, it may have been another application that goes bonkers with it. For that application, I had to use

script latn {

Latin

Mike

The early bird catches the worm, but the second mouse gets the cheese.

I suspect that you might be right about needing to use a Latin script.

Yes the application is CD X7, I have other fonts with DFLT script (that’s where I copied and adjusted the script for my font) and they all work fine with CD X7 inserting stylistic alternates, swash etc.

Done some cut & paste and testing with those script addons suggested by Bhikkhu & Mike. :smiley:

New script;

script latn {
  # Latin
  feature Fractions1;
  feature StylisticAlternates;
}
feature Fractions1 frac {
  # Fractions
  lookup Lookup1;
  lookup Lookup2;
}
lookup Lookup1 {
  # Referenced by feature "Fractions1"
  sub slash -> fraction;
}
lookup Lookup2 {
  # Referenced by feature "Fractions1"
  sub one fraction two -> onehalf;
  sub one fraction four -> onequarter;
  sub three fraction four -> threequarters;
}
feature StylisticAlternates salt {
 # Stylistic Alternates
 lookup Lookup3;
}
lookup Lookup3 {
  # Referenced by feature "StylisticAlternates"
 sub h -> [h h.salt];
 sub m -> [m m.salt];
 sub n -> [n n.salt];
 sub s -> [s s.salt];
 sub x -> [x x.salt];
 sub y -> [y y.salt];
 sub S -> [S S.salt];
}

;

Working fine now, thanks so much, it was a month that I have been copying and pasting scripts with no results.
Roger

Glad it’s working now, Roger.

DFLT can work, but I do believe there are more declarations that need made as to what the languages are. It’s been too long to remember exactly what needs done and where. I just use the other means and call it a day as it works in every application.

Mike

Your initial script put the Alternates into a Single substitution lookup. Your new script puts them into an Alternate substitution lookup.