All right, oh my captain, keep the indents and spacing tight on the monospace and sail along!
Btw., anyone still using monospaced fonts in their editors?
All right, oh my captain, keep the indents and spacing tight on the monospace and sail along!
Btw., anyone still using monospaced fonts in their editors?
Tell me you've never programmed without telling me you've never programmed… Almost all code editors and IDEs in current use are set with a monospaced font by default, and the overwhelming majority of programmers keep it that way.
No judgement if that is good or bad or at all. Just a reminder that it ain't monospace any longer.
> Your code is still monospaced in all the ways that matter.
Just it ain't monospace any longer. (reminder)
In monospace one letter/symbol (printable character) has constant width.
The ligature is one letter/symbol. so while the stylistic decision retains the monospace style of the replaced symbols, the ligature itself is double (or triple) sized compared with other symbols.
IIRC this is commonly called "monospaced ligatures" ref https://github.com/tonsky/FiraCode/issues/712
E.g. a compacting ligature for "www" seems to be welcome in some typefaces for coding. But again, only to stress the reminder: It ain't monospace any longer.
We do still may prefer for the typesetting pleasantry that it still is styled as monospace (or fixed width). but those ligatures aren't fixed width any longer as with the letter A, that's all.
This is the difference between what it looks like (two or three glyphs) and what it is (a single glyph). So we break monospace to keep it appearing fixed-width even with the ligatures.
Would be interesting if there is more typesetting theory about the width of ligatures in a monospace font.
1 ASCII byte, 1 cell. That way ligatures don't change the width of the original text. If a line used to require 42 columns, it still requires 42 columns. That's why we call them "monospace": each ASCII byte requires the exact same width, even when it's part of a ligature.
> a compacting ligature for "www" —
Is obviously out of scope. We're discussing monospace ligatures here, not compacting ones.
The question is aren't you?
I'm not so sure if I want that, maybe I get dumb by it?!
It's weird in a way, because there isn't all that much alignment going on in my code[1]. There's indentation, but that still works with a proportional font. And yet, it still looks wrong and hard to read. I can't really figure out why.
[1] I know some people align assignments in multiple lines, or comments at the end of the line, or similar things. I've been working under code style directives that prohibited those because lines changed more often because of whitespace than because of content. Since my work requires me not to do that, I don't have the habit at home either.
I did actually spend a year or two coding in a variable-width font, back in the '90s, but I switched back after the novelty wore off.