[fonttools/fonttools] 8f4a03: [instancer] Fix Private-dict vsindex handling in i...

1 view
Skip to first unread message

Behdad Esfahbod

unread,
Jul 29, 2026, 1:22:09 PM (7 days ago) Jul 29
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 8f4a033acb85c7378896b6ba8315bd42b5e31d6b
https://github.com/fonttools/fonttools/commit/8f4a033acb85c7378896b6ba8315bd42b5e31d6b
Author: Behdad Esfahbod <beh...@behdad.org>
Date: 2026-07-29 (Wed, 29 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 (#4132)

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
Reply all
Reply to author
Forward
0 new messages