Commit Graph
9 Commits
Author SHA1 Message Date
jpirnay 49b039a775 Fix SMP ligature filter and Extension-wrapped GPOS kern dispatch
Two related bugs in fontconvert_sdcard.py:

1. SMP filter for ligatures was post-pack, which only checked the
   already-masked low half (always ≤ 0xFFFF), didn't check `lc`, and
   couldn't catch SMP cps that already had bits truncated by the
   mask. Filter at source instead — inside extract_ligatures_fonttools
   when building the `filtered` dict — so any seq with an SMP
   component or any lig_cp > 0xFFFF is dropped before packing. The
   chained 3+ char path is naturally covered because
   `intermediate_cp = filtered[prefix].lig_cp` reads from the same
   already-filtered table.

2. GPOS kern dispatch checked `actual.LookupType` after unwrapping an
   Extension subtable. Format-specific subtables (PairPosFormat1/2)
   don't carry `LookupType`, so this fails for any Extension-wrapped
   PairPos lookup — i.e. how every modern font (Inter, Source Serif,
   Bitter, …) ships kern. Use the effective type instead:
       effective_type = getattr(st, "ExtensionLookupType", lookup.LookupType)
   so non-Extension lookups read the outer type and Extension lookups
   read the inner ExtensionLookupType, and Type-2 PairPos lookups
   actually reach _extract_pairpos_subtable in either case.
2026-05-10 10:16:36 +02:00
jpirnay 6f877c03eb Safety guard 2026-05-06 15:29:02 +02:00
jpirnay 180b601841 Extend character range 2026-05-05 20:49:30 +02:00
jpirnay 795e2fe9a9 Add two more fonts 2026-05-05 18:33:29 +02:00
jpirnay 9fba8b07e9 Minor stylistic updates 2026-05-05 17:54:38 +02:00
jpirnay f15b1d06bf Fix static font generation from variable fonts 2026-05-05 17:35:13 +02:00
jpirnay 2694081af9 Use bitmap.pitch instead of assuming tightly packed rows 2026-04-28 18:14:58 +02:00
jpirnay 8a2bc9f425 Some review comments 2026-04-28 15:47:51 +02:00
jpirnay aa9fae16d9 Integrate upstream #1392 by adriancaruana 2026-04-28 10:00:22 +02:00