From 26d3e306b1cafd872800713ba2865ddb6eadda48 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Dec 2024 11:52:39 -0700 Subject: [PATCH] Add an assertion --- component.py | 4 ++++ varcFont.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/component.py b/component.py index 38bc8f3..9222210 100644 --- a/component.py +++ b/component.py @@ -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): diff --git a/varcFont.py b/varcFont.py index 97a91aa..b36c620 100644 --- a/varcFont.py +++ b/varcFont.py @@ -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: