mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
An avar version 2 table with a NULL varStore offset is legal and maps like plain v1 — but partial-instancing it used to fail outright, because the planner errored against the missing store. Rather than falling back to the v1 instancing path (which rescales every variation store and is not always bit-exact), keep such fonts on the avar2 path: mapping entries that don't resolve to a real store row are normalized to NO_VARIATIONS_INDEX, mirroring runtime get_delta semantics, and offset compensation creates the needed delta rows on demand in an empty store. The instance stays version 2 and bit-exact, and consumers that ignore the v2 tail still see the renormalized v1 segment maps. Adds a subset test with a null-VarStore variant of the RobotoDelta test font; the instancing test fails outright without the fix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>