fonttools / fonttools

A library to manipulate font files from Python.
MIT License
4.37k stars 454 forks source link

[fealib] allow script and language statements usage within a named lookup #501

Closed marekjez86 closed 8 years ago

marekjez86 commented 8 years ago

copied from https://github.com/adobe-type-tools/afdko/issues/101#issuecomment-178309158 "The current (and intended) case in makeotf is that script and language statements affect only the enclosing feature, and are not attached to lookups defined within a feature. As a result, script and language statements used within a named lookup have no effect on other features which reference the named lookup. I find this confusing and difficult to explain, but am reluctant to break existing font data. After thinking a bit more, I propose leaving the wording as is, and just add a warning to makeotf when script and language statements are used within a named lookup."

Could fealib also allow the same processing for the code of the type: languagesystem DFLT dflt; feature test { lookup L { script grek; pos T 100; } L; } test;

brawer commented 8 years ago

For an unrelated reason (https://github.com/behdad/fonttools/issues/505), feaLib’s output currently does not match makeotf’s output for this snippet.

brawer commented 8 years ago

After https://github.com/behdad/fonttools/commit/aae350c84a323ad3426b1c0f181ca877e95cc95c, the outputs of feaLib and makeotf are now identical for the above snippet.