Merge pull request #2744 from fonttools/fix-issue2694-again

[feaLib.builder] Fix for #2694: Remove GDEF warning
This commit is contained in:
Just van Rossum 2022-08-16 14:46:53 +02:00 committed by GitHub
commit 853cadb0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,14 +224,12 @@ 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 gdef:
log.warning("GDEF is not requested, but is needed")
if "BASE" in tables:
base = self.buildBASE()
if base: