Add missing location argument
and make code nicer.
This commit is contained in:
parent
f926909fef
commit
d1b916ad04
@ -2065,7 +2065,7 @@ class ConditionsetStatement(Statement):
|
||||
self.conditions = conditions
|
||||
|
||||
def build(self, builder):
|
||||
builder.add_conditionset(self.name, self.conditions)
|
||||
builder.add_conditionset(self.location, self.name, self.conditions)
|
||||
|
||||
def asFea(self, res="", indent=""):
|
||||
res += indent + f"conditionset {self.name} " + "{\n"
|
||||
|
@ -1568,10 +1568,11 @@ class Builder(object):
|
||||
def add_vhea_field(self, key, value):
|
||||
self.vhea_[key] = value
|
||||
|
||||
def add_conditionset(self, key, value):
|
||||
if not "fvar" in self.font:
|
||||
def add_conditionset(self, location, key, value):
|
||||
if "fvar" not in self.font:
|
||||
raise FeatureLibError(
|
||||
"Cannot add feature variations to a font without an 'fvar' table"
|
||||
"Cannot add feature variations to a font without an 'fvar' table",
|
||||
location,
|
||||
)
|
||||
|
||||
# Normalize
|
||||
|
Loading…
x
Reference in New Issue
Block a user