5 ms·
I'm not a fan of the ligatures. But I'm not sure this website's "They contradict Unicode". Yes there are code points for ligatures. But it's also very reasonabl
by NelsonMinar 5y ago
I'm not a fan of the ligatures. But I'm not sure this website's "They contradict Unicode". Yes there are code points for ligatures. But it's also very reasonable for a typesetting system to encode the individual characters and just combine them to a ligature glyph for presentation. Which is what programming fonts have to do, since the ligature code points aren't part of the programming language.
I do something much weirder, I program in proportional fonts. Once you get used to it it's really lovely. Unfortunately the way I figured out how to do it requires some aggressive reformatting of code (mostly using tabs instead of spaces) which makes it hard to share code with others unless they buy in to your preferences.
- avgcorrection 5y agoMy impression was that codepoints for ligatures are there for backwards compatibility reasons. In that case they wouldn’t add codepoints for brand new ligatures. So I don’t really get the point that he’s making (if I’m correct).
- WorldMaker 5y agoYeah, most of the codepoints for ligatures that exist in Unicode are for compatibly mapping from old encodings that predate modern font ligature support (such as EBCDIC had a bunch of manual ligature encodings). These days Unicode suggests leaving ligatures entirely to fonts and unencoded as most people don't need to round-trip through an EBCDIC speaking mainframe (hopefully!).
- seanmcdirmid 5y agoWhat’s weird about programming in proportional fonts? I’ve been doing that for a decade now. Auto formatter mandated at work doesn’t allow for manual format directives anyways, so no one notices. Ligatures can be nice if you can solve the edit problem: keeping an -> as two characters even if it looks like → can help a lot. Unfortunately, editors don’t do that, so they become too annoying to use (maybe when we render code like we render latex will it be accepted).
- cevn 5y ago> Editors don't do that VS code does it at least, if i'm interpreting you correctly. You can position your cursor in the middle of the ligature and change either side
- seanmcdirmid 5y agoThat sounds pretty nice. Like if you do a backspace into a right pointing arrow (->) does it turn a dash?
- gregmac 5y agoYes. I use ligatures on my system (Windows) and this is true in all IDEs, editors and terminal Windows, including when I SSH to a Linux system and use vim. It really becomes seamless, and you get used to it in a similar way to syntax highlighting or high resolution screen. Yes, I can code on 768p laptop screen with laggy input and a crappy keyboard, but it's not as nice as my usual workstation.
- seanmcdirmid 5y agoI tried it in Visual Studio (not Code) once, and was disappointed by the experience. Perhaps they just got it wrong. Now if only there are any proportional coding fonts with coding ligatures baked in :p.
- NelsonMinar 5y agoI think NF Code does? https://github.com/sgigou/NF-Code https://github.com/sgigou/NF-Code Input and Go Font are the two main coding proportional fonts I know. Neither advertise ligature support. There are hacks to copy ligatures from Fira Code in to other fonts but I don't know if they would work for this purpose. https://github.com/ToxicFrog/Ligaturizer https://github.com/ToxicFrog/Ligaturizer
- 5y ago