[fonttools/fonttools] 4e1f4a: [designspaceLib] Read an empty <lib> element as an...

1 view
Skip to first unread message

Cosimo Lupo

unread,
Aug 20, 2026, 8:04:17 AM (6 days ago) Aug 20
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 4e1f4a358e5b7a5f3bb5f1934a0873b6af61a745
https://github.com/fonttools/fonttools/commit/4e1f4a358e5b7a5f3bb5f1934a0873b6af61a745
Author: Sanjay Santhanam <51058514+S...@users.noreply.github.com>
Date: 2026-08-02 (Sun, 02 Aug 2026)

Changed paths:
M Lib/fontTools/designspaceLib/__init__.py
M Tests/designspaceLib/designspace_test.py

Log Message:
-----------
[designspaceLib] Read an empty <lib> element as an empty lib

readLib() and readLibElement() indexed libElement[0] unconditionally, so a
designspace file containing an empty <lib> element (document level or inside
an instance) raised IndexError instead of loading.

Both now skip an element with no children, leaving lib at its default empty
dict, which is what removing the <lib> lines entirely already produced.

Adds test_emptyLib covering both the document-level and instance-level cases.

Closes #4142


Commit: 26b31a4dfcb995729542717462a50ee02194fb34
https://github.com/fonttools/fonttools/commit/26b31a4dfcb995729542717462a50ee02194fb34
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-08-20 (Thu, 20 Aug 2026)

Changed paths:
M Lib/fontTools/designspaceLib/__init__.py
M Tests/designspaceLib/designspace_test.py

Log Message:
-----------
Merge pull request #4144 from Sanjays2402/fix/designspace-empty-lib

[designspaceLib] Read an empty <lib> element as an empty lib


Compare: https://github.com/fonttools/fonttools/compare/62d182f7b515...26b31a4dfcb9

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