[fonttools/fonttools] e6bb5f: Fix overflow reporting when sizing contextual lookups

1 view
Skip to first unread message

Cosimo Lupo

unread,
Sep 7, 2026, 1:26:41 PMSep 7
to fontto...@googlegroups.com
Branch: refs/heads/fix-contextual-size-overflow
Home: https://github.com/fonttools/fonttools
Commit: e6bb5fe394b418b17f27ac22b96da2d39fb4a472
https://github.com/fonttools/fonttools/commit/e6bb5fe394b418b17f27ac22b96da2d39fb4a472
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)

Changed paths:
M Lib/fontTools/otlLib/builder.py
M Tests/otlLib/builder_test.py

Log Message:
-----------
Fix overflow reporting when sizing contextual lookups

Set the standalone lookup writer's metadata so offset overflows raise OTLOffsetOverflowError and allow another format to be tried. Add regression coverage for GSUB and GPOS, with and without extensions.



To unsubscribe from these emails, change your notification settings at https://github.com/fonttools/fonttools/settings/notifications

Cosimo Lupo

unread,
Sep 9, 2026, 1:49:28 PMSep 9
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: e6bb5fe394b418b17f27ac22b96da2d39fb4a472
https://github.com/fonttools/fonttools/commit/e6bb5fe394b418b17f27ac22b96da2d39fb4a472
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)

Changed paths:
M Lib/fontTools/otlLib/builder.py
M Tests/otlLib/builder_test.py

Log Message:
-----------
Fix overflow reporting when sizing contextual lookups

Set the standalone lookup writer's metadata so offset overflows raise OTLOffsetOverflowError and allow another format to be tried. Add regression coverage for GSUB and GPOS, with and without extensions.


Commit: 2a93de2209317546d4016ea09b229e0417f59eb8
https://github.com/fonttools/fonttools/commit/2a93de2209317546d4016ea09b229e0417f59eb8
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)

Changed paths:
M Lib/fontTools/otlLib/builder.py
A Tests/otlLib/contextual_overflow_test.py

Log Message:
-----------
Split contextual rulesets when all formats overflow

Retry consecutive halves until a candidate fits, preserving rule order within the lookup. Keep the existing error for an unsplittable single rule.


Commit: 9c625d410065e5006502bee9d4c734b2bf8c5c54
https://github.com/fonttools/fonttools/commit/9c625d410065e5006502bee9d4c734b2bf8c5c54
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-09-09 (Wed, 09 Sep 2026)

Changed paths:
M Lib/fontTools/otlLib/builder.py
M Tests/otlLib/builder_test.py
A Tests/otlLib/contextual_overflow_test.py

Log Message:
-----------
Merge pull request #4171 from fonttools/fix-contextual-size-overflow


Compare: https://github.com/fonttools/fonttools/compare/48a0cf93bbca...9c625d410065
Reply all
Reply to author
Forward
0 new messages