Branch: refs/heads/main
Home:
https://github.com/fonttools/fonttools
Commit: 3ca0f167722f1d3650c954d7fde772be573cbc1b
https://github.com/fonttools/fonttools/commit/3ca0f167722f1d3650c954d7fde772be573cbc1b
Author: Behdad Esfahbod <
beh...@behdad.org>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
M Lib/fontTools/ttLib/tables/TupleVariation.py
M Tests/ttLib/tables/TupleVariation_test.py
M Tests/ttLib/tables/otConverters_test.py
Log Message:
-----------
[ttLib] Handle empty packed deltas when optimizing for speed (#4241)
* [ttLib] Handle empty packed deltas when optimizing for speed
The speed-optimized packed-delta encoder calls min() and max() on its
input even when the input is empty. Saving a VARC AxisIndicesList with
an empty tuple then raises ValueError, whereas size-optimized saving
round-trips it correctly. Direct scalar TupleVariation.compileDeltas
calls also fail because their Y delta stream is empty.
Skip the fixed-width selection for an empty stream. Preserve the
existing bytearray when appending no deltas, and test scalar encoding
and VARC binary round trips under both optimization modes, including
lazy INDEX decoding.
Testing: full pytest suite, 4993 passed; Black check.
Assisted-by: OpenAI Codex
* [tests] Explain the lazy INDEX threshold in empty-delta coverage
To unsubscribe from these emails, change your notification settings at
https://github.com/fonttools/fonttools/settings/notifications