2 ms·
Something I’d like are soft programming ligatures, a concept I just invented: Ligatures which are ligatures and thus show that the unit is a semantic unit, but
by ttepasse 3y ago
Something I’d like are soft programming ligatures, a concept I just invented:
Ligatures which are ligatures and thus show that the unit is a semantic unit, but displays a minimal visual break in-between, showing that there are two code points underneath. Similar to the classic fi ligature which doesn’t make a complete new glyph, but arranges the glyphs for f and i in a more pleasing manner.
For programming ligatures that would mean that "===" doesn’t give "≡" but more something like "⩶". I’m approximating with mathematical unicode characters here, the real thing would of course have a width of 2 or 3ch.
- sparkie 3y agoThese exist and are part of the fonts the article is talking about, though I've not seen it done for `==` because there's already a gap there. The ligatures for `==` in these fonts usually combine them to remove the space, but keeping it as two distinct characters. In JuliaMono/Fira Code, if you sequence `::`, the left colon in shifted slightly to the right and the right colon is shifted slightly to the left and both are scaled down slightly vertically. Try ::, :=, --, #!, ``, !!, ;; using Fira Code: https://www.programmingfonts.org/#firacode https://www.programmingfonts.org/#firacode These fonts can contain optional features which can be enabled/disabled dynamically by supporting editors. You could customize the behavior for specific languages and have the editor only show those features when you have the relevant language file loaded.