[feaLib] Behavior of using `language` without corresponding `languagesystem`
See original GitHub issueCopy-paste from a secret project issue tracker:
Me: @moyogo Cosimo says you might know why feaLib doesn’t complain about using
language
without alanguagesystem
decl 😮
@moyogo: The Feature Syntax specification isn’t clear about this. It seems to be valid to have a
script
orlanguage
statement that doesn’t have a matchinglanguage system
declaration present.The
language system
statements are to define what applies by default. Thescript
orlanguage
statements are to specify what script and language system a feature and lookups belong to.If a
script
andlanguage
statement doesn’t have a matchinglanguage system
then it never has the default features and only has the features where it is specifically called. A bit odd but there might be a corner case for it.For example
language system DFLT dflt; language system latn CAT; language system latn ROM; feature feat { # Because there is no script or language this applies to all language systems declared above # DFLT dft, latn CAT, latn ROM but not anything else; sub one by two; # This only applies to latn ENG. script latn; language ENG; sub one by three; } feat;
@anthrotype: what does makeotf do in this case?
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
There is no issue here,
languagesystem
is some syntactic sugar and does not have to be used at all (makeotf
will warn if nolanguagesystem
was used, but it that is nonsense).From one of my fonts:
Adding
languagesystem latn dflt;
makes no sense as I don’t want any feature under thelatn
script other thanlocl
.If you’re using the above code then it’s going to fail because you have
language system
instead oflanguagesystem
.