diff --git a/Lib/fontTools/feaLib/builder.py b/Lib/fontTools/feaLib/builder.py index 0a64cdc5d..b23fcf752 100644 --- a/Lib/fontTools/feaLib/builder.py +++ b/Lib/fontTools/feaLib/builder.py @@ -780,6 +780,9 @@ class Builder(object): raise FeatureLibError( "Script statements are not allowed " "within standalone lookup blocks", location) + if self.language_systems == {(script, 'dflt')}: + # Nothing to do. + return self.cur_lookup_ = None self.script_ = script self.lookupflag_ = 0 diff --git a/Tests/feaLib/data/lookupflag.fea b/Tests/feaLib/data/lookupflag.fea index ced046b67..1828c43ed 100644 --- a/Tests/feaLib/data/lookupflag.fea +++ b/Tests/feaLib/data/lookupflag.fea @@ -134,3 +134,16 @@ feature test { pos one 1; } V; } test; + +feature test { + lookup W { + lookupflag IgnoreMarks; + script latn; + pos one 1; + } W; + lookup X { + lookupflag IgnoreMarks; + script latn; + pos two 2; + } X; +} test; diff --git a/Tests/feaLib/data/lookupflag.ttx b/Tests/feaLib/data/lookupflag.ttx index 82f1945eb..760eab313 100644 --- a/Tests/feaLib/data/lookupflag.ttx +++ b/Tests/feaLib/data/lookupflag.ttx @@ -43,7 +43,7 @@ - + + + + + - + @@ -86,9 +97,17 @@ + + + + + + + + - + @@ -357,6 +376,30 @@ + + + + + + + + + + + + + + + + + + + + + + + +