4 ms·
> Also, "is this a ligature or some Unicode glyph?" was a question I found myself asking. In code editors that use monospaced fonts the ligatures will often lo
by avgcorrection 5y ago
> Also, "is this a ligature or some Unicode glyph?" was a question I found myself asking.
In code editors that use monospaced fonts the ligatures will often look nicer since things like Unicode arrows will only take up a single “character space”.
- eyelidlessness 5y agoMany of these ligatured programming fonts look the same way, by shifting the combined characters horizontally into a single width space.
- WorldMaker 5y agoYeah, but that "single width character" is often still in the middle of two widths worth of space. In most environments that should still often be enough of a clue.
- eyelidlessness 5y agoIt wasn’t, for me, trying Fira and other ligatured fonts. The cognitive overload was too much, for no clear (again to me) benefit. I love well crafted typefaces, but decided this is a place where this particular craft wasn’t for me.
- WorldMaker 5y agoIt's a subtle clue still, but you pick up on it more and more with use, especially after cursoring through/deleting past the ligatures enough. It eventually becomes second nature. Of course, there's no reason to pick up those subtle clues/habits if you don't see a benefit to the ligatures in the first place. The benefits themselves are sometimes subtle, and I'm unlikely to convince you if you've already made up your mind on that. For what it is worth, I find that they improve readability (and per the Python maxim: code is read way more often than it is written), and they do catch subtle bugs sometimes. As one example, in Fira Code (and successors), the difference between the ligatures of == and === are quite noticeable and useful in JS programming. But yeah, mostly it's just for cleaner reading: math symbols and pretty arrows. If that doesn't appeal to you, it doesn't appeal to you.
- klyrs 5y agoThis is precisely my problem. I like monospaced fonts because a single character occupies a well-defined width. I do not like it when len('≡') == 3
- zerocrates 5y agoThough if you did it differently and the ligature was in a single-character width it would mess up alignment between users who are and aren't using the ligatures... probably a worse problem.
- klyrs 5y agoNo, that's what happens in some ligature fonts: '=', '<=' and '===' all render a single character wide. It messes up alignment and drives me up the wall
- pindab0ter 5y agoExcept no ligature font I’ve ever seen does that, because that’s a terrible idea and a mark against any specific font that does that, not against ligatures in general.
- avgcorrection 5y agoI don’t think code should be aligned to begin with.
- michaelcampbell 5y agoI tend to read horizontally and not vertically, so that hasn't been an issue for me. The column oriented code layouts I just find so eye-rolly but people like different things.
- zozbot234 5y agoUnicode includes "double width" characters as well.
- avgcorrection 5y agoI don’t understand the relevance.
- nitrogen 5y agoThe displayed width alone is not enough information to tell a ligature from a single character.
- avgcorrection 5y agoI was under the wrong impression that “double width” was only a property of some codepoints that were effectively double width variants of the printable ASCII symbols, for use in East Asian contexts. But now I see that there is a combining codepoint, so codepoints in general can be made “double width”. So this does indeed seem relevant.
- CRConrad 5y agoCheck boxes and stuff occupy about a character- width-and-a-half when pasted into Notepad++ set to use Lucida Monospace.