Summary
There is currently no runtime way to disable programming ligatures. They are gated purely by the compile-time YETTY_ENABLE_LIB_HARFBUZZ feature flag — when harfbuzz is compiled in, the bundled FiraCode ligature face is always loaded and ligature runs are always shaped. Turning ligatures off requires rebuilding without harfbuzz.
Current behaviour
- All ligature handling is wrapped in
#ifdef YETTY_ENABLE_LIB_HARFBUZZ (src/yetty/yvterm/vterm.c).
- When harfbuzz is enabled,
vterm_load_ligature_face(vterm, config) is called unconditionally during font setup (src/yetty/yvterm/vterm.c:1259-1263). No config key is consulted.
- A search of
src/yetty/yconfig and include/yetty/yconfig finds no ligature-related key.
- The only "off" path is a best-effort fallback: if the FiraCode face fails to load, it logs
ligatures disabled and renders operator characters individually — a failure path, not a user setting.
Proposal
Add a runtime config key (e.g. terminal/text-layer/font/ligatures, default true to preserve current behaviour) and guard the vterm_load_ligature_face() call on it. When disabled, skip loading the ligature face so ligature_face_index stays 0 and each character renders individually — no rebuild required.
Sketch
- Add
YETTY_YCONFIG_KEY_... for the new key in yconfig.
- In
src/yetty/yvterm/vterm.c:1262, wrap the call:
if (config->ops->get_bool(config, YETTY_YCONFIG_KEY_TERMINAL_FONT_LIGATURES, true)) {
vterm_load_ligature_face(vterm, config);
}
- Document the key in the config docs.
Summary
There is currently no runtime way to disable programming ligatures. They are gated purely by the compile-time
YETTY_ENABLE_LIB_HARFBUZZfeature flag — when harfbuzz is compiled in, the bundled FiraCode ligature face is always loaded and ligature runs are always shaped. Turning ligatures off requires rebuilding without harfbuzz.Current behaviour
#ifdef YETTY_ENABLE_LIB_HARFBUZZ(src/yetty/yvterm/vterm.c).vterm_load_ligature_face(vterm, config)is called unconditionally during font setup (src/yetty/yvterm/vterm.c:1259-1263). No config key is consulted.src/yetty/yconfigandinclude/yetty/yconfigfinds no ligature-related key.ligatures disabledand renders operator characters individually — a failure path, not a user setting.Proposal
Add a runtime config key (e.g.
terminal/text-layer/font/ligatures, defaulttrueto preserve current behaviour) and guard thevterm_load_ligature_face()call on it. When disabled, skip loading the ligature face soligature_face_indexstays 0 and each character renders individually — no rebuild required.Sketch
YETTY_YCONFIG_KEY_...for the new key in yconfig.src/yetty/yvterm/vterm.c:1262, wrap the call: