[fonttools/fonttools] 3577e1: [scaleUpem] Don't mutate the shared default CFF Fo...

0 views
Skip to first unread message

Cosimo Lupo

unread,
Oct 7, 2026, 10:52:18 AM (3 days ago) Oct 7
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 3577e1ffa657a5f788408c8fe0335ce08c024970
https://github.com/fonttools/fonttools/commit/3577e1ffa657a5f788408c8fe0335ce08c024970
Author: Timothy Meade <t...@do.dev>
Date: 2026-10-06 (Tue, 06 Oct 2026)

Changed paths:
M Lib/fontTools/ttLib/scaleUpem.py
M Tests/ttLib/scaleUpem_test.py

Log Message:
-----------
[scaleUpem] Don't mutate the shared default CFF FontMatrix

scale_upem scaled topDict.FontMatrix in place. For a Top DICT with no
explicit FontMatrix, that attribute is the class-level default list in
TopDict.defaults, so scaling one font changed the default for every CFF
font in the process. The font's matrix then equalled the (changed)
default and was omitted when saving, so it read back as 1/1000 with the
new unitsPerEm.

Assign a new list instead, and add a regression test.

Fixes #4251

Claude-Session: https://claude.ai/code/session_01EGH8cnGqJhNZGvyfKZq3tH


Commit: e7eff3805ec434045f61998fc1b8147bae1cdda9
https://github.com/fonttools/fonttools/commit/e7eff3805ec434045f61998fc1b8147bae1cdda9
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-10-07 (Wed, 07 Oct 2026)

Changed paths:
M Lib/fontTools/ttLib/scaleUpem.py
M Tests/ttLib/scaleUpem_test.py

Log Message:
-----------
Merge pull request #4252 from timmeade/scaleupem-fontmatrix-default

[scaleUpem] Don't mutate the shared default CFF FontMatrix


Compare: https://github.com/fonttools/fonttools/compare/8b8225574345...e7eff3805ec4

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