[fonttools/fonttools] e202b7: [subset] bug fix

0 views
Skip to first unread message

Behdad Esfahbod

unread,
Jun 18, 2026, 1:45:31 PM (7 days ago) Jun 18
to fontto...@googlegroups.com
Branch: refs/heads/beyond-64k
Home: https://github.com/fonttools/fonttools
Commit: e202b7553518e8455e2c15b19a879a1a8ad3578d
https://github.com/fonttools/fonttools/commit/e202b7553518e8455e2c15b19a879a1a8ad3578d
Author: Qunxin Liu <qx...@google.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/subset/__init__.py

Log Message:
-----------
[subset] bug fix

No need to keep constructions for glyphs that are only added
during math closure.
See also: https://github.com/harfbuzz/harfbuzz/issues/5998


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

Changed paths:
A Tests/subset/data/test_math_closure.ttx
M Tests/subset/subset_test.py

Log Message:
-----------
[subset] add regression test for MATH closure construction fix

A glyph pulled into the subset only by MATH variant closure must not
keep its own MathGlyphConstruction. Closure is a single pass, so the
variants such a construction references are not themselves closed over,
and keeping it leaves dangling references to glyphs absent from the
subset. The existing MATH test fonts never place a size variant in its
own coverage, so they cannot exercise this; this test builds a font
that does.


Commit: 365e8a812624c23cafa45e7e4597c7ebec2fd74e
https://github.com/fonttools/fonttools/commit/365e8a812624c23cafa45e7e4597c7ebec2fd74e
Author: Harry Dalton <harry....@daltonmaag.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/ufoLib/kerning.py

Log Message:
-----------
Make glyph-to-group construction accessible outside of lookup function

This improves ergonomics for constructing glyph-to-group mappings prior
to repeated kern lookups: you get the convenience of fonttools
constructing the mappings, but avoid the repeated cost on each call.


Commit: c9ba06bee2df9580e97675fdd659e43b97ab1b3a
https://github.com/fonttools/fonttools/commit/c9ba06bee2df9580e97675fdd659e43b97ab1b3a
Author: Harry Dalton <harry....@daltonmaag.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/ufoLib/kerning.py

Log Message:
-----------
Fix documentation typo


Commit: 954334895e6d5b8c2f2033d664597813e6b96228
https://github.com/fonttools/fonttools/commit/954334895e6d5b8c2f2033d664597813e6b96228
Author: Harry Dalton <harry....@daltonmaag.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/ufoLib/kerning.py

Log Message:
-----------
Fix type typo in groups argument docs

Co-authored-by: Cosimo Lupo <cos...@anthrotype.com>


Commit: cab7b736313e8586138c1b2a49c8f26bfa978c13
https://github.com/fonttools/fonttools/commit/cab7b736313e8586138c1b2a49c8f26bfa978c13
Author: Harry Dalton <harry....@daltonmaag.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/ufoLib/kerning.py

Log Message:
-----------
Document accelerated example


Commit: 648f97de6741be2070a4113a708163b6ac6e6e3a
https://github.com/fonttools/fonttools/commit/648f97de6741be2070a4113a708163b6ac6e6e3a
Author: Harry Dalton <harry....@daltonmaag.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/ufoLib/kerning.py

Log Message:
-----------
Clarify groups argument docs further, in both functions


Commit: 88d7e8ed0931018ea546a1bebec91884e6bf7401
https://github.com/fonttools/fonttools/commit/88d7e8ed0931018ea546a1bebec91884e6bf7401
Author: Harry Dalton <harry....@daltonmaag.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/ufoLib/kerning.py

Log Message:
-----------
Document that groups are expected to be pre-validated


Commit: 00a3ec601d5c2311ce531a5b0fadf363312b9d61
https://github.com/fonttools/fonttools/commit/00a3ec601d5c2311ce531a5b0fadf363312b9d61
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Lib/fontTools/ttLib/tables/_g_l_y_f.py
M Tests/ttLib/tables/_g_l_y_f_test.py

Log Message:
-----------
[glyf] Use reverse glyph map for O(1) __setitem__ membership

table__g_l_y_f.__setitem__ tested `glyphName not in self.glyphOrder`, a linear
scan of the glyphOrder list on every assignment, so repeatedly assigning glyphs
over a pre-populated glyphOrder was O(n^2) in the glyph count -- several seconds
of pure scanning for a 60k-glyph font.

Use the reverse glyph map (_reverseGlyphOrder) for O(1) membership instead,
rebuilding it when it is missing or its length no longer matches glyphOrder, and
invalidating it on __delitem__. Reordering goes through setGlyphOrder, which
already clears the map; editing glyphOrder directly behind the table's back is
unsupported.

Related to #2605, a separate correctness issue (the TTFont-level
_reverseGlyphOrderDict going stale, see #3582), not changed here.


Commit: 86f9e0bde5b6d988ccea4d6a12c56209c8d49962
https://github.com/fonttools/fonttools/commit/86f9e0bde5b6d988ccea4d6a12c56209c8d49962
Author: Harry Dalton <harry....@daltonmaag.com>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Doc/source/index.rst

Log Message:
-----------
Update minimum version in docs


Commit: 65fa9bfd09b0f14136405ae1e63f494cc90acfb3
https://github.com/fonttools/fonttools/commit/65fa9bfd09b0f14136405ae1e63f494cc90acfb3
Author: Behdad Esfahbod <beh...@behdad.org>
Date: 2026-06-18 (Thu, 18 Jun 2026)

Changed paths:
M Tests/ttLib/tables/otTables_test.py

Log Message:
-----------
Avoid false success resolving lookup overflows


Compare: https://github.com/fonttools/fonttools/compare/1942214095ab...65fa9bfd09b0

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