diff --git a/Lib/fontTools/feaLib/builder.py b/Lib/fontTools/feaLib/builder.py index c5c75a7ae..6e654374a 100644 --- a/Lib/fontTools/feaLib/builder.py +++ b/Lib/fontTools/feaLib/builder.py @@ -679,15 +679,17 @@ class Builder(object): self.cur_lookup_name_ = name self.named_lookups_[name] = None self.cur_lookup_ = None - self.lookupflag_ = 0 - self.lookupflag_markFilterSet_ = None + if self.cur_feature_name_ is None: + self.lookupflag_ = 0 + self.lookupflag_markFilterSet_ = None def end_lookup_block(self): assert self.cur_lookup_name_ is not None self.cur_lookup_name_ = None self.cur_lookup_ = None - self.lookupflag_ = 0 - self.lookupflag_markFilterSet_ = None + if self.cur_feature_name_ is None: + self.lookupflag_ = 0 + self.lookupflag_markFilterSet_ = None def add_lookup_call(self, lookup_name): assert lookup_name in self.named_lookups_, lookup_name diff --git a/Tests/feaLib/data/lookupflag.fea b/Tests/feaLib/data/lookupflag.fea index 651dcd038..ced046b67 100644 --- a/Tests/feaLib/data/lookupflag.fea +++ b/Tests/feaLib/data/lookupflag.fea @@ -95,3 +95,42 @@ feature test { lookup M; lookup N; } test; + +feature test { + lookupflag IgnoreMarks; + lookup O { + pos one 1; + } O; + lookup P { + pos one 1; + } P; +} test; + +feature test { + lookup Q { + pos one 1; + } Q; + lookup R { + pos one 1; + } R; +} test; + +feature test { + lookup S { + lookupflag IgnoreMarks; + pos one 1; + } S; + lookup T { + pos one 1; + } T; +} test; + +feature test { + lookup U { + pos one 1; + } U; + lookup V { + lookupflag IgnoreMarks; + pos one 1; + } V; +} test; diff --git a/Tests/feaLib/data/lookupflag.ttx b/Tests/feaLib/data/lookupflag.ttx index bb05b9a15..52a09b8a9 100644 --- a/Tests/feaLib/data/lookupflag.ttx +++ b/Tests/feaLib/data/lookupflag.ttx @@ -61,7 +61,7 @@ - + @@ -76,11 +76,19 @@ + + + + + + + + - + @@ -253,6 +261,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +