mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 16:02:24 +00:00
`build_font` reached for gpui's `FontFeatures::disable_ligatures()`, which
emits `calt: 0` and nothing else. `calt` is only the contextual-alternate
feature a programming face drives `=>` and `!=` from — the `fi`/`ffl`/`ffi`
ligatures live in `liga` and `clig`, which that call never mentions. They were
left at the shaper's default, and CoreText, DirectWrite and rustybuzz all
default them on. A terminal cannot have them: a ligature is one glyph where the
grid budgeted a cell per character, so the row drifts.
So the documented "ligatures off" default did not hold on any platform. Name
`calt`, `liga` and `clig` all zero and it holds everywhere.
Windows was the sharpest case. gpui's DirectWrite backend always attaches an
`IDWriteTypography` to the run, so an empty feature list leaves that object
empty and suppresses DirectWrite's own defaults, while any non-empty list has
`liga: 1`/`clig: 1` appended — asking for `calt: 0` bought ligatures that
asking for nothing would not have. Shaping "office waffle fluffier" in Calibri
through the real DirectWrite shaper: 22 glyphs for 22 characters with an empty
list, 15 with `calt: 0`, 22 again with all three named zero.
`rlig` is left alone — it carries the ligatures a script cannot be written
without. A configured `font_features` still wins untouched, so an explicit
`{"liga": 1}` keeps its ligatures.