Branch: refs/heads/avar2-instancing
Home:
https://github.com/fonttools/fonttools
Commit: bf6f82741fa698a3807b90c6194b8a266992e4f4
https://github.com/fonttools/fonttools/commit/bf6f82741fa698a3807b90c6194b8a266992e4f4
Author: Behdad Esfahbod <
beh...@behdad.org>
Date: 2026-08-04 (Tue, 04 Aug 2026)
Changed paths:
M Lib/fontTools/varLib/instancer/__init__.py
M Tests/varLib/instancer/instancer_test.py
Log Message:
-----------
[instancer] Never downgrade avar2: take the avar2 path even with a NULL VarStore
An avar version 2 table with a NULL (or empty) VarStore behaves like
plain v1, but downgrading it to v1 on partial instancing — as the
previous fix for the NULL-VarStore crash did — loses the avar2 path's
key property: variation tables stay in old coordinate space and the
instance is bit-exact, because offset compensation can synthesize the
needed delta rows on demand. Consumers that ignore the v2 tail still
see the renormalized v1 segment maps, so nothing is lost for them
either.
So: gate avar2 partial instancing on the avar version alone. Mapping
entries (or the implicit identity mapping) that don't resolve to a real
store row are normalized to NO_VARIATION_INDEX, mirroring runtime
behavior, and a NULL VarStore starts as an empty store that offset
compensation populates. Matches the behavior HarfBuzz chose.
Co-Authored-By: Claude Fable 5 <
nor...@anthropic.com>
To unsubscribe from these emails, change your notification settings at
https://github.com/fonttools/fonttools/settings/notifications