Branch: refs/heads/instancer-cff2-private-vsindex
Home:
https://github.com/fonttools/fonttools
Commit: 172d91bfc3ebe32cf88b690011cf261a0ae4d0d5
https://github.com/fonttools/fonttools/commit/172d91bfc3ebe32cf88b690011cf261a0ae4d0d5
Author: Behdad Esfahbod <
beh...@behdad.org>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M Lib/fontTools/varLib/instancer/__init__.py
M Tests/varLib/instancer/instancer_test.py
Log Message:
-----------
[instancer] Fix Private-dict vsindex handling in instantiateCFF2
The private-dict blend passes mishandled vsindex three ways: the
read-back loop consulted a stale 'values' binding from a previous
iteration; private.vsindex is a scalar but was subscripted, raising
TypeError as soon as a Private dict actually carried one; and vsindex
was tracked per operator name rather than per dict, applying the last
dict's index to every dict's blends. Iterate dicts in the outer loop
and resolve each dict's own vsindex up front instead.
Also guard the post-instancing vsindex remap: a dict whose VarData
lost all its regions has no entry in the mapping; its blends have
dissolved into plain values, so drop the vsindex instead of raising
KeyError.
Fixes
https://github.com/fonttools/fonttools/issues/4129
To unsubscribe from these emails, change your notification settings at
https://github.com/fonttools/fonttools/settings/notifications