Hacker News new | ask | show | jobs
by tsimionescu 521 days ago
At least for programming ligatures, wouldn't they tend to be shown as a single glyph (and occupy the same space)? I don't like them, but for people that do, I expected ≠ to be displayed instead of !=, not a different longer glyph.
2 comments

In coding fonts with ligatures, ligatures usually have the same width as all of the component characters combined. So if you type !=, you will see a character looking like ≠ that is two advances wide. You will even be able to select the middle of the character, hit backspace, and delete the (invisible) "!".

This is necessary because if all ligatures were one advance wide, you couldn't easily tell the difference between =, ==, and ===, or between != and !==.

I would rather != stay the way it is, and have the language support ≠ as a synonym. 30 years ago, on the mac's HyperCard, the language supported ≠ as an inequality comparator (as well as ≤ and ≥ for <= and >=, respectively). On the mac it's easy to type with the Option key and =.

Back then, those characters weren't easy to type on dos/windows so it seems to be a case of being stuck with the "lowest common denominator" in terms of character input across OSes, reminiscent of C's trigraphs where "??<" was used because keyboards didn't have "{"—thankfully those are long gone. Ligatures are a hack around that but it always struck me as an inelegant solution.