Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spec] Explicitly forbid statements of wrong type in feature aalt #97

Open
brawer opened this issue Jan 11, 2016 · 4 comments
Open

[spec] Explicitly forbid statements of wrong type in feature aalt #97

brawer opened this issue Jan 11, 2016 · 4 comments
Labels

Comments

@brawer
Copy link
Contributor

brawer commented Jan 11, 2016

Proposal: Change the OpenType File Specification so that within feature aalt, only the following statements are allowed: (a) references to other features, (b) single substitutions, or (c) alternate substitutions.

Currently, when building feature aalt, makeotf v2.0.90 ignores any lookups that aren’t single or alternate substitutions. All other statements are silently stripped off without any warning or error. For example, this input produces a font without any OpenType tables:

feature aalt {
   sub f i by fi;
} aalt;

Although makeotf’s current behavior technically complies with the OpenType Feature File specification, it may not be obvious to feature file authors that feature aalt is built so differently from other features. Hence the proposal to change the spec to require compilers to raise an error when a feature aalt block contains statements that would be ignored.

@kenlunde
Copy link

This may not be the right place to bring up this particular makeotf bug related to the 'aalt' GSUB feature, but if a referenced GSUB feature (of the form feature xxxx;) references its own explicit lookups (of the form lookup xxxxxxxxxx;), the substitutions in such lookups, even if they are of the allowed type (such as single substitutions), are ignored.

The 'aalt' GSUB feature of the Source Han Sans family does not include the substitutions from the somewhat large (in terms of the number of substitutions) 'locl' GSUB feature, which uses only explicit lookups to support language-specific substitutions. (The current features files no longer reference the 'locl' GSUB feature in the 'aalt' GSUB feature for this reason.)

@brawer
Copy link
Contributor Author

brawer commented Jan 11, 2016

Personally, I’d agree that it would make sense to follow lookup xxxxxxxxxx; in referenced features when collecting alternates. @readroberts, can the spec be changed?

@benkiel
Copy link
Contributor

benkiel commented Jan 11, 2016

For what it's worth, the Feature File documentation does call out the special nature of aalt.

@readroberts
Copy link
Contributor

I agree that it is a good idea for makeotf to emit a warning when the 'aalt' feature references another feature and no substitutions at all are added from the referenced feature. It is also definitely a bug that explicitly referenced lookups are not followed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants