Skip to content

Commit

Permalink
Sanitize location first, so we won't get a wrong HAVE_AXES flag etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Apr 22, 2024
1 parent 4986383 commit b98cdb1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/fontra_compile/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ async def collectComponentInfo(self, glyph: VariableGlyph) -> list[ComponentInfo
numSources = len(glyphSources)

for compoInfo in components:
# Filter out unknown/unused axes
compoInfo.location = {
axisName: values
for axisName, values in compoInfo.location.items()
if values
}

isVariableComponent = bool(compoInfo.location)

flags = 0
Expand All @@ -304,13 +311,6 @@ async def collectComponentInfo(self, glyph: VariableGlyph) -> list[ComponentInfo
if attrName in VARCO_IF_VARYING:
isVariableComponent = True

# Filter out unknown/unused axes
compoInfo.location = {
axisName: values
for axisName, values in compoInfo.location.items()
if values
}

axesAtDefault = []
for axisName, values in compoInfo.location.items():
firstValue = values[0]
Expand Down

0 comments on commit b98cdb1

Please sign in to comment.