[fonttools/fonttools] 574937: Give an actionable error when LookupList overflow ...

0 views
Skip to first unread message

Cosimo Lupo

unread,
Jun 22, 2026, 3:16:06 PM (3 days ago) Jun 22
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 57493798b5fc3363206189cd0255e593d6de0a6a
https://github.com/fonttools/fonttools/commit/57493798b5fc3363206189cd0255e593d6de0a6a
Author: AmitMY <am...@nagish.com>
Date: 2026-06-22 (Mon, 22 Jun 2026)

Changed paths:
M Lib/fontTools/ttLib/tables/otTables.py
M Tests/ttLib/tables/otTables_test.py

Log Message:
-----------
Give an actionable error when LookupList overflow is unrecoverable

When a LookupList -> Lookup offset overflows and every lookup is already an
Extension lookup, fixLookupOverFlows has nothing left to promote and silently
returned 0, so compile re-raised a bare OTLOffsetOverflowError with no
explanation. Log a clear, actionable message instead.

The log is guarded on overflowRecord.SubTableIndex is None so it only fires for
genuine LookupList -> Lookup overflows, not for the subtable-overflow fallback
path (where fixLookupOverFlows is re-tried with SubTableIndex set and the
"LookupList offset overflowed" wording would be misleading). The advice is also
conditioned on have_uharfbuzz: suggest installing uharfbuzz only when it isn't
already installed; otherwise suggest reducing the number of lookups.

Co-Authored-By: Claude Opus 4.8 (1M context) <nor...@anthropic.com>


Commit: bf587c50401f5a0036b9498682a753a92447ffbd
https://github.com/fonttools/fonttools/commit/bf587c50401f5a0036b9498682a753a92447ffbd
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-06-22 (Mon, 22 Jun 2026)

Changed paths:
M Lib/fontTools/ttLib/tables/otTables.py
M Tests/ttLib/tables/otTables_test.py

Log Message:
-----------
Merge pull request #4109 from AmitMY/fix-lookuplist-overflow-message


Compare: https://github.com/fonttools/fonttools/compare/ca105fa4b5f1...bf587c50401f

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