Allow features to be added to VF without building GDEF; warn when GDEF would be needed but isn't requested. This fixes #2694
This commit is contained in:
parent
32aa8eafcb
commit
e4c5c842f1
@ -224,14 +224,14 @@ class Builder(object):
|
||||
del self.font[tag]
|
||||
if any(tag in self.font for tag in ("GPOS", "GSUB")) and "OS/2" in self.font:
|
||||
self.font["OS/2"].usMaxContext = maxCtxFont(self.font)
|
||||
gdef = self.buildGDEF() # build unconditionally so we can warn below
|
||||
if "GDEF" in tables:
|
||||
gdef = self.buildGDEF()
|
||||
if gdef:
|
||||
self.font["GDEF"] = gdef
|
||||
elif "GDEF" in self.font:
|
||||
del self.font["GDEF"]
|
||||
elif self.varstorebuilder:
|
||||
raise FeatureLibError("Must save GDEF when compiling a variable font", None)
|
||||
elif gdef:
|
||||
log.warning("GDEF is not requested, but is needed")
|
||||
if "BASE" in tables:
|
||||
base = self.buildBASE()
|
||||
if base:
|
||||
|
Loading…
x
Reference in New Issue
Block a user