logoalt Hacker News

jve • today at 10:47 AM • 16 replies • view on HN

Is it only me but I really dislike "Code Ligations"? I have to mark some chars to count how many consecutive "=" simbols there are... or \/ looking like V without having other chars near it to distinguish. Having to copy paste diamond shape to find out it is <>. arrows with squiggly tails, /> being ugly, <. having dot in the middle...

That could be the maximum I'd like out of font to have "proper" greater/less-equal sign.


Replies

slazaro • today at 10:53 AM

They always seemed to me like solutions to a nonexistent problem. They make the code less readable, but ligatures exist and they seemed like a cool tech thing to implement, and they might look cool in screenshots. But in practice, in my opinion, they're worse than just having the normal characters. But I guess it's a matter of opinion, no harm in other people using them.

➕ show 3 replies
strenholme • today at 1:51 PM

I have used Fontforge to remove all ligatures from a programming font; e.g. my monospace font of choice is a aggressively subsetted variant of Fira Code with no ligatures whatsoever.

https://github.com/samboy/CaulixtlaFonts/tree/main/MiscFonts...

graypegg • today at 3:32 PM

I personally like them because (to me) it makes a few symbols less ambiguous. (I use Victor Mono [0], so in my mind things like == and === in that font makes mistakes more obvious to me at least.)

But also... I know I have the minority opinion on this. It absolutely should be opt-in, not opt-out. I think the past decade, I've been told the font tweaks I enable are incomprehensable to everyone I work with. The way I like my IDE fonts is far outside the bell curve (ligatures, cursive variants for some syntax, proportional variants for prose) so the fact that most new monospace code-focused fonts seem to align with my opinions should be concerning to font makers! I like that I don't have to patch a different font's italics into my code font anymore, but common sense says I SHOULD still have to do that!

[0] https://rubjo.github.io/victor-mono#ligatures

ragnese • today at 12:22 PM

I thought I was the only one! I figured I was either crazy or getting old and stuck in my ways. The first I'm I saw a font with them, I thought it was cool and tried it out. I almost immediately hated it. I've tried a few more times for varying lengths of time, and I've decided that I really do hate them.

Semaphor • today at 11:19 AM

Common complaint.

Personally, I like them. They look pleasing and I never had issues distinguishing between the ligatures for ==, ===, and = itself.

bita_nidir • today at 12:33 PM

I logged into HN to upvote your comment. Code Ligations are an absolute abomination.

sicktriple • today at 1:49 PM

Ligatures suck. That's what Iosevka Fixed is for.

apetrovic • today at 10:59 AM

I like them and use them. But every editor I worked with has an option to disable ligatures.

➕ show 1 reply
semiquaver • today at 10:51 AM

ligatures, not ligations

➕ show 2 replies
kps • today at 1:27 PM

Yeah, Unicode shipped 35 years ago. If you want a ≠ then use a ≠.

➕ show 4 replies
doodpants • today at 3:39 PM

You and me both. Ligatures are a solution to a problem that monospaced fonts don't have. I don't mind if a mono font uses ligatures to harmonize character spacing/alignment a little bit. But I don't want things like a "proper" greater/less-equal sign; if a font goes so far as to replace >= with ≥, then it's lying to me about what characters are actually present in the file.

➕ show 1 reply
mkesper • today at 11:01 AM

The 'fixed' variant disables them.

pmontra • today at 1:02 PM

It's not only you.

wildrhythms • today at 10:57 AM

I hate them. I disable them in every code editor. I don't need to have to guess if it's a double equals or a triple equals

➕ show 2 replies
boltzmann64 • today at 1:03 PM

I used to hate font ligatures until I discovered Commit Mono (my all time favorite monospace font). They use the ligatures only to adjust spacing and make it look better on a monospace grid. No stupid <=, -> ligatures or anything else.

WesolyKubeczek • today at 12:16 PM

Code ligatures look like the final desperate attempt of an aging hipster, a Ruby on Rails and Web2.0 early adoptr (sic), the type to wear thick-rimmed fake glasses and a scarf in the middle of summer, to be cool, as he is riding his old Segway, with a glass of soy latte in one hand and an avocado toast in the other, into the void of oblivion.

I don't like them because I never know what they actually stand for in ASCII.