[fonttools/fonttools] 12edc9: [mort] Decode trimmed contextual substitution wind...

2 views
Skip to first unread message

Cosimo Lupo

unread,
Aug 25, 2026, 9:24:02 AM (9 days ago) Aug 25
to fontto...@googlegroups.com
Branch: refs/heads/mort-state-tables
Home: https://github.com/fonttools/fonttools
Commit: 12edc9e091f67515d02917dcf178961b5916d999
https://github.com/fonttools/fonttools/commit/12edc9e091f67515d02917dcf178961b5916d999
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-08-25 (Tue, 25 Aug 2026)

Changed paths:
M Lib/fontTools/ttLib/tables/otConverters.py
M Tests/ttLib/tables/_m_o_r_t_test.py

Log Message:
-----------
[mort] Decode trimmed contextual substitution windows (#4161)

The classic contextual format resolves a substitution by adding the entry's
word offset (possibly negative) to the glyph ID, so each offset exposes a
per-glyph window rather than a whole lookup table, and real fonts (e.g.
macOS's CharcoalCY, GenevaCY, HelveticaCY) trim those windows to the glyphs
an entry can apply to. Decode only the words that fall inside the
substitution table instead of reading a full per-glyph array and rejecting
offsets that precede it. The window is clamped to the subtable, slightly
stricter than HarfBuzz's blob-wide upper bound.



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