The following is a way to define an OpenType Layout feature
swsh to be registered in all globally (i.e. for the entire font) declared languagesystems:
languagesystem DFLT dflt;
languagesystem latn dflt;
languagesystem latn ROM;
languagesystem cyrl dflt;
languagesystem cyrl SRB;
feature swsh {
lookup swsh01 {
sub a by a.swsh;
} swsh01;
} swsh;
The following is a valid way to write the same but using locally declared languagesystems.
feature swsh {
script DFLT;
language dflt;
lookup swsh01 {
sub a by a.swsh;
} swsh01;
script latn;
language dflt;
lookup swsh01;
language ROM include_dflt;
script cyrl;
language dflt;
lookup swsh01;
language SRB include_dflt;
} swsh;
The following is an
invalid way to write the same but using locally declared languagesystems (in AFDKO 2.5 syntax). I.e. it will not work with the current AFDKO syntax, although I guess it would be useful if such syntax were implemented.
feature swsh {
script DFLT;
language dflt;
lookup swsh01 {
sub a by a.swsh;
} swsh01;
script latn include_DFLT;
script cyrl include_DFLT;
} swsh;
Obviously, I'm proposing the addition of
include_DFLT and
exclude_DFLT as keywords that can follow a
script declaration. If
include_DFLT is specified after a script declaration other than
DFLT, all lookups defined in the script
DFLT would be also registered with the scripts
latn and
cyrl (in the example above). The default implicit value for should be
exclude_DFLT in order not to break backwards-compatibility.
This would make for a rather handy shorthand and eliminate quite some mistakes made by less experienced font developers.