Skip to content

Commit

Permalink
Add an assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad committed Dec 10, 2024
1 parent b6a1e36 commit 26d3e30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions component.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ def analyzeComponents(glyph_masters, glyphs, glyphAxes, publicAxes):
masterLocation[axis] = 0

for i, component in enumerate(layer.glyph.components):
assert component.name == defaultComponents[i].name, (
component.name,
defaultComponents[i].name,
)
ca = cas[i]
t = component.transformation
if otRound(t.translateX):
Expand Down
4 changes: 3 additions & 1 deletion varcFont.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ async def buildVarcFont(rcjkfont, glyphs):
allTransformMasterValues = tuple(allTransformMasterValues)

axisIndexMasterValues = allAxisIndexMasterValues[0]
assert all(axisIndexMasterValues == m for m in allAxisIndexMasterValues), allAxisIndexMasterValues
assert all(
axisIndexMasterValues == m for m in allAxisIndexMasterValues
), allAxisIndexMasterValues
rec.numAxes = len(axisIndexMasterValues)
if axisIndexMasterValues:
if axisIndexMasterValues in axisIndicesMap:
Expand Down

0 comments on commit 26d3e30

Please sign in to comment.