Hacker News new | past | comments | ask | show | jobs | submit login

They are nice, they make the code look like the mathematics that it is.



The problem with using symbols that fall outside of original ASCII set is that they’re hard to type.

It feels, to me, like a failure of user interface when someone has to resort to a mouse for input.

Like watching someone trying to play a piano on screen with a mouse. I’m sure it’s possible to compose that way but it looks so clumsy compared to someone fluently playing a keyboard.

EDIT: looks like most of these fonts are just being used for substitutions. I guess I’m neutral on that. Looks nice but I think I still prefer raw text version. Could be convinced either way.


These are abusing/using the facility modern fonts have to elaborate ligatures that modify the display of characters when they sit next to each other. Which is very straightforward once you know how it works but as you've learned is confusing when you haven't and are looking at these things for the first time in a code sample.

If you copy and paste these examples into a text editor, the font won't have the ligatures and you'll see the characters as you'd expect. They're not inserting weird codepoints to display the symbols; there's a literal < and = next to each other and the font renderer looks them up in a table and renders the mathematical less-than-or-equal symbol.

English script doesn't have many ligatures (ff, and fi are common ones, the bars on the ff are combined, and the dot on the i is subsumed into the bar of the f) but some languages and scripts have lots, I think Arabic does. Cursive English is all ligatures since letters join up differently depending on the letters next to them.


You could look into using "compose key." It's quite intuitive and opens up a whole new world of expression.


With ligatures, the symbols are still just ASCII, so you type '>=' but it looks like '≥' on your screen.


Æ, ӕ <- these are examples of the intended use for a ligature.


You are looking at the raw text version. This is just how the font displays the raw text.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: