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?
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];
}
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
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.
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
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.