From c9ed0d134855b3401c60728b884803f8b59c63e8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 13 May 2024 22:11:50 -0600 Subject: [PATCH] [instancer/CFF2] Minor sanity check --- Lib/fontTools/varLib/instancer/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/fontTools/varLib/instancer/__init__.py b/Lib/fontTools/varLib/instancer/__init__.py index 0501188b9..702d58b67 100644 --- a/Lib/fontTools/varLib/instancer/__init__.py +++ b/Lib/fontTools/varLib/instancer/__init__.py @@ -584,6 +584,9 @@ def instantiateCFF2( topDict = cff.topDictIndex[0] varStore = topDict.VarStore.otVarStore + varStore2 = topDict.CharStrings.varStore.otVarStore + + assert varStore is varStore2 # Who knows why it's in two places?! def getNumRegions(vsindex): return len( @@ -593,6 +596,7 @@ def instantiateCFF2( charStrings = topDict.CharStrings.values() allCommands = [] for cs in charStrings: + assert cs.private.vstore.otVarStore is varStore # Or in many places!! commands = programToCommands(cs.program, getNumRegions=getNumRegions) if generalize: commands = generalizeCommands(commands)